I've been using a lot of awk lately for csv files.
But I've been using awk for csv files that contain 32 fields per line.
For the first time, I've been given a csv file that contains one field per line (13 fields in each csv file).
I need to check that a specific field, or line contains a string.
There are no commas or delimiters at the end of each line.
Here's how I would calculate it if all fields were in one line.
trade_count=`awk -F, '$7 ~ /:22A:NEWT/ { trade_count++ } END { print trade_count }' myCSV.csv`
How would I convert that to a csv file that has one field per line?
I found this in another post, how do I apply it to what I want to accomplish?
awk '{ if(NR == 7) print}' <filename>