[TAG] 2cent tip
joey at linuxamd.com
Fri Jun 6 20:13:47 MSD 2008
Kapil Hari Paranjape wrote:
> On Fri, 06 Jun 2008, Thomas Bonham wrote:
>> I thought I would sure this little perl script that will remove the
>> comments out of a configuration file.
> Why not just the following?
> grep -v '^#.*' < input > output
I take it a step farther and make it executable and put it in the path
of system commands like /bin/ and this way it can be called from anywhere.
[joey at xen ~]$ cat /bin/clean
grep -v '\#' $1 | sed /'^$'/d > $1.clean
L. G. Mirror Coordinator
Joey at linuxamd.com
Main Site http://linuxgazette.net
More information about the TAG