Deleting a character

Hi I have a file that looks like this:

arg1       ert
arg_7     ert
arg_9     ert
ban        ert

Basically what I want to do is delete the _# ending. So the output will look like this:

arg1       ert
arg         ert
arg         ert
ban        ert

thanks

awk '{sub(/_./,"  ")}1' file
sed 's/_[^ ]*//' file
sed 's/_[0-9]//' <name-of-input-file>

thegeek & jp2542a
Did you check the OP required output ?

dang.. lost points on that test :slight_smile: