3 ms·
Improve the CSV: # add to end \ |exec tr '\15' '\12' \ |exec awk 'NR==1{a=$0}NR==3{b=$0}NR==5{print}NR>=6{print "\42"a"\42,"b","$0}' # update
by feelin_googley 9y ago
Improve the CSV:
# add to end
\
|exec tr '\15' '\12' \
|exec awk 'NR==1{a=$0}NR==3{b=$0}NR==5{print}NR>=6{print "\42"a"\42,"b","$0}'
# update CSV header line
\"sitetitle\",\"url\",\"pageID\",\"pagetitle1\",\"pagetitle2\",\"jsonurl\"/;};
Probably would be better to change "jsonurl" to "jsonfile" and just save the filename. The location (URL) of this file may be in several locations or it may change over time.