AWK save to file
➜ awk cat test1.txt | awk 'BEGIN{FS=":";OFS="|"}{print $1,$2,$3}' > test11.txt
![](http://www.linuxcommands.site/wp-content/uploads/2019/04/awk_to_file_1-1024x246.png)
AWK append to file
➜ awk cat test1.txt | awk 'BEGIN{FS=":";OFS="|"}{print $1,$2,$3}' >> test11.txt
![](http://www.linuxcommands.site/wp-content/uploads/2019/04/awk_to_file_2-1024x334.png)
➜ awk cat test1.txt | awk 'BEGIN{FS=":";OFS="|"}{print $1,$2,$3}' > test11.txt
➜ awk cat test1.txt | awk 'BEGIN{FS=":";OFS="|"}{print $1,$2,$3}' >> test11.txt