This profile is from a federated server and may be incomplete. Browse more on the original instance.
Studying and awk came up....
Lydia_K, 1 year ago I use awk all the time, nothing too fancy, but when you need to pull out elements of text it’s usually way easier than using cut. awk {’ print $3 ‘} will pull the third element based on your IFS variable (internal field separater, default is whitespace) awk {’ print $NF ‘} gets you the last element, and awk {’ print $(NF-1) '} gets you one element from the last, and so on. Basic usage but so fast and easy for so many everyday command line things.
I use awk all the time, nothing too fancy, but when you need to pull out elements of text it’s usually way easier than using cut.
awk {’ print $3 ‘} will pull the third element based on your IFS variable (internal field separater, default is whitespace)
awk {’ print $NF ‘} gets you the last element, and awk {’ print $(NF-1) '} gets you one element from the last, and so on.
Basic usage but so fast and easy for so many everyday command line things.
Is anyone using awk?
Studying and awk came up....