posts - 3, comments - 0, trackbacks - 0, articles - 1
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

Shell and Shell Script for Linux

Posted on 2011-12-17 14:50 CT 阅读(130) 评论(0)  编辑 收藏 引用
Shell, shell script and other scripts are very important to learn and master linux.

  1. 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'
  2. Delete comment and blank lines using extended regular express.
    $ egrep -v '^$|^#' /etc/man.config

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理