AWK tutorial: awk newline character

How to use Awk print out a newline character in a string ???

ylspiritdeMacBook-Pro:awk ylspirit$ ls | awk '{printf "%s\\n\n", $1}'

ylspiritdeMacBook-Pro:awk ylspirit$ ls | awk '{print $1 "\\n"}'

2 Comments

Add a Comment

Your email address will not be published.