Closed hungrymonkey closed 5 years ago
awk -F "," '{print $4}' northamericacruisedetaildata.csv | sed -e 's/^[\t ]//g' -e 's/[[:space:]]*$//' | awk '{ a[$0]++ } END { for (n in a) print n","a[n] } ' | sort > departures.csv
Although I changed the sed command, the only thing I need to change was change $1 to $0 $1 is the first column. $0 is the the whole row
awk -F "," '{print $4}' northamericacruisedetaildata.csv | sed -e 's/^[\t ]//g' -e 's/[[:space:]]*$//' | awk '{ a[$0]++ } END { for (n in a) print n","a[n] } ' | sort > departures.csv
Although I changed the sed command, the only thing I need to change was change $1 to $0 $1 is the first column. $0 is the the whole row