[sed]【1行野郎】行頭「#」と空白のみの行を削除して表示させる
1132 ワード
本シリーズのトップページ |
---|
https://qiita.com/robozushi10/items/5d1313fa11ede179ddad |
概要
行頭「#」と空白のみの行を削除して表示させる.
下記のどれかを実行すれば良い
$ sed -r -e '/^(\s*)$/d' -e '/^#/d' /etc/dnsmasq.conf
$ sed -e '/^[[:space:]]*$/d' -e '/^#/d' /etc/dnsmasq.conf
$ grep -E -v '^\s*$' /etc/dnsmasq.conf
Author And Source
この問題について([sed]【1行野郎】行頭「#」と空白のみの行を削除して表示させる), 我々は、より多くの情報をここで見つけました https://qiita.com/robozushi10/items/517fa7e2b0e1c1af2751著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .