Posted on 2011-12-17 14:50
CT 阅读(132)
评论(0) 编辑 收藏 引用
Shell, shell script and other scripts are very important to learn and master linux.
- Fetch lines containing 'MAN' from /etc/man.config, and exclude comment lines.
$ cat /etc/man.config | grep 'MAN' | grep -v '^#'
$ cat /etc/man.config | grep 'MAN' | sed 's/#.*$//g' | sed '/^$/d' - Delete comment and blank lines using extended regular express.
$ egrep -v '^$|^#' /etc/man.config