| Post Title | Posted | Description |
|---|---|---|
Parent Directory
|
||
| Hide comments in conf files and scripts | 2006-06-22 19:05 | Not the beautifulest, but works for me. |
Sometimes when I look at different .conf files or scripts, comments cluttering up my terminal bother me – I just want to see the real stuff. So I perled myself a little script, added to a pathed folder and now I can just type for example:
nocomment /etc/smb.conf
and voila – no junk in my terminal. And if I want to output that to a file instead of terminal…
nocomment /etc/smb.conf > /etc/smb.conf.new
Here's the simple script called nocomment
Dave Brondsema wrote:
grep -v '^[#;]' /etc/smb.conf
Posted on 22-Jun-06 at 8:05 pm | Permalink
Andrej wrote:
I knew there was a geekier way :) Thanks Dave.
Posted on 22-Jun-06 at 8:59 pm | Permalink