awk
has a command for this:
$ awk '{print $2}' <filename>
You can, of course, also pipe in text output from another program:
$ who
noah console Oct 21 14:06
noah ttys000 Oct 23 13:08
noah ttys001 Oct 23 14:00
noah ttys004 Oct 22 21:48
$ who | awk '{print $2}'
console
ttys000
ttys001
ttys004