How do I implement a carriage or newline return in every awk command in a shell script, such that each command's output is separated from the next?
Perhaps I need more specification. I have two awk commands, listed below:
awk {print $1, $2}
, awk command 1, outputs:
John Bender
Bohn Jender
Jen Bondher
awk '{print $3, $4}'
, command 2, outputs:
AGE 21
AGE 420
AGE 2345678909876543234567890876543234567890876543
When combined in a shell script, and run with ./<testscript>.sh <textfile>
, the command line obviously outputs:
John Bender
Bohn Jender
Jen Bondher
AGE 21
AGE 420
AGE 2345678909876543234567890876543234567890876543
Because I want the newline append PER awk command, I want the output to look simply like:
John Bender
Bohn Jender
Jen Bondher
AGE 21
AGE 420
AGE 2345678909876543234567890876543234567890876543
Previous attempts at appending "\n" have resulted in:
John Bender
Bohn Jender
Jen Bondher
AGE 21
AGE 420
AGE 2345678909876543234567890876543234567890876543
..which is certainly unwanted.