March 2018
Beginner to intermediate
416 pages
9h 24m
English
This redirection operator appends the output to file. It's syntax is as follows:
print items >> demo
In this type of redirection, items are appended into the preexisting output file named demo. Here, while performing the redirection the output file is not erased. If the output file does not exist, then it is created. For example, now we append the content at the end of the file (emp_report) created using the printf_rediection1.awk using redirection operator (>>), as follows:
$ vi printf_append.awkBEGIN { printf "=========employee database ends here=============\n" >>"emp_report"
}$ awk -f printf_append.awk
On execution of preceding code, it will append the line in the existing file, emp_report, which was created ...
Read now
Unlock full access