This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
using_awk_to_prepend_or_append_data_to_each_line [2020/06/01 22:53] 127.0.0.1 external edit |
using_awk_to_prepend_or_append_data_to_each_line [2023/05/22 12:51] (current) Joel Dare |
||
---|---|---|---|
Line 6: | Line 6: | ||
| | ||
This command will take every line from //input.csv//, pipe it through //awk// and echo it to stdout. //awk// in turn, will print "12345," at the beginning of each of those lines. The //$0// value means the rest of the line we passed to //awk// from //input.csv//. | This command will take every line from //input.csv//, pipe it through //awk// and echo it to stdout. //awk// in turn, will print "12345," at the beginning of each of those lines. The //$0// value means the rest of the line we passed to //awk// from //input.csv//. | ||
+ | |||
+ | <box 50% round orange|Sweet Awk Magic>[[https://course.joeldare.com/awk/|Join my 90-minute workshop and learn my tips and tricks to quickly process CSV files with Awk.]]</box> | ||
If you wanted to output that data to a new file, just use the typical greater than sign to redirect to a new file (//output.csv// in the following example). | If you wanted to output that data to a new file, just use the typical greater than sign to redirect to a new file (//output.csv// in the following example). |