On Sat, 08 Nov, 2008 at 12:55:01 +0100, Sandy Drobic wrote:
Jon Clausen wrote:
<snip>
That's neat :)
Where'd you get it?
<snip>
Grin! It's probably just a little shell script:
Indeed, or maybe some perl? Anyway; Even if it's little more than a specialized 'grep', I think it's still kinda neat.
/usr/bin/nocomment:
I'd probably place it under /usr/local/bin
------------------------- #!/bin/sh function usage {
<snip>
}
if [ $# -ne 1 ]; then usage exit 1 else egrep -v '^#' $1
let's skip empty lines as well; egrep -v '^#|^$' $1
fi
------------------------- (returns to search results...) ahh! there it is; http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392256 has more on the subject. Essentially; nocomment() { grep -v -e '^#.*$\|^[[:space:]]*$' $1 ; } But initially I was just wondering where David got *his* nocomment... regards, jon -- YMMV -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org