3 ms·
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
by asicsp 8y 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-processing/blob/master/gnu_awk.md https://github.com/learnbyexample/Command-line-text-processi...
[1]: https://github.com/learnbyexample/Command-line-text-processing/blob/master/ruby_one_liners.md https://github.com/learnbyexample/Command-line-text-processi...
[2]: https://github.com/learnbyexample/Command-line-text-processing/blob/master/perl_the_swiss_knife.md https://github.com/learnbyexample/Command-line-text-processi...