Problem scenario
You want each line of a file to have a prefix or suffix attached. How do you print out this combination of a fixed string with each individual line of the file?
Solution
cat foobar.txt | awk '{ print "prefix" $1 "suffix" }'
A Technical I.T./DevOps Blog
Problem scenario
You want each line of a file to have a prefix or suffix attached. How do you print out this combination of a fixed string with each individual line of the file?
Solution
cat foobar.txt | awk '{ print "prefix" $1 "suffix" }'