Hrm, looks like my FA classes didn't quite sink in.
<sigh> the question was: is there a way to strip
shell-style comments (# blah). As it turns out, this perl
regexp does the trick.... (from bod)
s/^((([^\\"#]+|"[^\\"]*(\\.[^\\"]*)*")*|(\\.)*)*)(#.*)?/$1/I had argued that you cannot do this with a standard (FA) regular expression, but as aj pointed out to me, this shouldn't be the case. So, as an exercise for the reader, rewrite that in a form that sed recognizes.... :-)