To cut out hash marked comments, I can use:
cut -f 1 -d '#' foobar.txt
Supposing I want to also cut semicolon marked comments?
cut -f 1 -d '[#;]' foobar.txt # This does not work
cut -f 1 -d '#' -d ';' foobar.txt # Neither does this
cut -f 1 -d '#|;' foobar.txt # Neither does this
I know that I could use a cut for each character:
cut -f 1 -d '#' foobar.txt | cut -f 1 -d ';' # This kludge works
Mark.
--
Mark Hobley,
393 Quinton Road West,
Quinton, BIRMINGHAM.
B32 1QE.
Wouldn't it be better to use a more powerful tool, such as AWK?
And, BTW, this is more of a comp.unix.shell question than a
comp.unix.programmer one.