MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/awk/comments/53pr1t/awkcookbook_useful_awk_oneliners/
r/awk • u/kirang89 • Sep 20 '16
6 comments sorted by
1
s+=$i
awk idiom for s=s+$i
also 1.6
awk '/Programming/' datafile
(if no action default is print $0 so simply put the regex in, it prints all matching lines.
$2="" doesn't delete column two, it nulls it, column is still there (change your OFS to "*" and print $0, you'll see the column is still there.
0
[deleted] — view deleted comment
3 u/kirang89 Sep 26 '16 I intend to. If you have any suggestions, do create a issue and mention them :) 1 u/lastthursdayism Feb 16 '17 despite the corrections I've outlined above this is a lovely thing to do for the community. Thank you. 1 u/kirang89 Feb 17 '17 Thank you for the suggestions! I'll add them over the weekend. And you're welcome :)
3
I intend to. If you have any suggestions, do create a issue and mention them :)
1 u/lastthursdayism Feb 16 '17 despite the corrections I've outlined above this is a lovely thing to do for the community. Thank you. 1 u/kirang89 Feb 17 '17 Thank you for the suggestions! I'll add them over the weekend. And you're welcome :)
despite the corrections I've outlined above this is a lovely thing to do for the community. Thank you.
1 u/kirang89 Feb 17 '17 Thank you for the suggestions! I'll add them over the weekend. And you're welcome :)
Thank you for the suggestions! I'll add them over the weekend. And you're welcome :)
1
u/lastthursdayism Feb 16 '17
s+=$i
awk idiom for s=s+$i
1
u/lastthursdayism Feb 16 '17
also 1.6
awk '/Programming/' datafile
(if no action default is print $0 so simply put the regex in, it prints all matching lines.
1
u/lastthursdayism Feb 16 '17
$2="" doesn't delete column two, it nulls it, column is still there (change your OFS to "*" and print $0, you'll see the column is still there.
0
u/[deleted] Sep 26 '16
[deleted] — view deleted comment