> How do I cut a word out of a line with sed? The word end with a '_'. I > don't know, how to match word boundaries. I need "sample" > out of a sample_ line.
you can match word characters instead.
sed 's/[^ ]+_ / /'
sed 's/[a-zA-Z0-9_]+_([^a-zA-Z0-9_])/\1/'
russ
