[TAG] 2cent tip
thomasbonham at bonhamlinux.org
Fri Jun 6 20:24:39 MSD 2008
Joey Prestia wrote:
> 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
> cd $PWD
> grep -v '\#' $1 | sed /'^$'/d > $1.clean
I put my perl scirpts in /usr/local/bin and then add that to my path on
the mac and then I can run them from any where I would like to.
More information about the TAG