MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1xqm31/simple_data_analysis_using_grepsedawkbc_and_more/
r/programming • u/jbnicolai • Feb 12 '14
3 comments sorted by
2
Nice. Btw this sort of awk if statements
awk -F, '{ if ($8 > 250 && ($5/$8) < 10) print $0}'
can be simplified to
awk -F, '$8 > 250 && ($5/$8) < 10'
where you can use the pattern as the filter ( /filter/{action}), and by default the command is print the line.
Awk's really nice :)
1 u/jbnicolai Feb 13 '14 Thanks! What I love most about having written this is how much I have learned from the feedback. :)Awk is indeed a constant surprise in how nice it is.
1
Thanks! What I love most about having written this is how much I have learned from the feedback. :)
Awk is indeed a constant surprise in how nice it is.
Cool stuff, didn't know about casper before.
2
u/myg204 Feb 13 '14
Nice. Btw this sort of awk if statements
can be simplified to
where you can use the pattern as the filter ( /filter/{action}), and by default the command is print the line.
Awk's really nice :)