>Hard to beat: awk '{ print $1; }'
How about: cut -f 1 -d ' '
You don't even need the -d flag if the you happen to be able to use the default delimiter, like in your example.
How about: cut -f 1 -d ' '
You don't even need the -d flag if the you happen to be able to use the default delimiter, like in your example.
apples 1
bananas 2