Hacker News new | ask | show | jobs
by asicsp 2869 days ago
for your given sample, you could use awk[0] as well

    awk 'NR>1{print $2}'
or ruby[1]

    ruby -ane 'puts $F[1] if $.>1'
which one to use depends on lots of factor - speed, features, availability, etc as well as whether user already knows perl[2]/ruby/etc

Further reading(disclosure: I wrote these)

[0]: https://github.com/learnbyexample/Command-line-text-processi...

[1]: https://github.com/learnbyexample/Command-line-text-processi...

[2]: https://github.com/learnbyexample/Command-line-text-processi...