On Thu, 30 Oct 2003, Kunkel, Mark wrote: > We are attempting to use sed to remove blank lines from a stream with: > > sed '/^[ ]*$/d' > $ cat /etc/services | sed -e 's/\W//g' s/ means substitute. ^ matches the beginning of the line only so I've no idea why this even works in cygwin. \W means all whitespace. (conversely, \w means match a word) /g means global. I'm not certain how portable this is, but it does work for me. I highly recommend reading the regex section in programming perl on the perl dfa matching engine. -- Matthew Galgoci "If you were a woman I'd kiss you right now." System Administrator Red Hat, Inc 919.754.3700 x44155 -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list