The shell command adds characters to the front and back of each line in the file
How the shell inserts characters at the beginning of each line in a file:
awk '{print "xxx"$0}' fileName
How the shell inserts characters at the end of each line in a file:
awk '{print $0"xxx"}' fileName
How the shell inserts characters into the specified column of each line in a file:
awk '$O=$O" xxx"' fileName
To insert characters before and after each line in a file at once:
awk '{print "xxx"$0"yyy"}' fileName
0 Comments