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” }’ …
Continue reading “How Do You Write a Bash Command That Combines a String with Each Line of a File?”