Index of /andrejciho/Linux/Hide comments in conf files and scripts

Post Title Posted Description
Back Parent Directory
Hide comments in conf files and scripts 2006-06-22 19:05

Not the beautifulest, but works for me.


Be Sociable, Share!

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


Comments (2) to “Hide comments in conf files and scripts”

  1. grep -v ‘^[#;]‘ /etc/smb.conf

  2. I knew there was a geekier way :) Thanks Dave.

Leave a Comment
*Required
*Required (Never published)
 

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

This website is powered by Wordpress