I have this line were I am selecting some fields from one file and creating a new file for the selected data.
awk -F "\"*,\"*" '{print $1"," $2}' folderone/list.txt > folderone/qlist.txt
This works, but then from this new file I want it to create a new file where it separates data:
$2 >5 it goes to goodlist.txt
$2 <=5 it goes to badlist.txtI have tried variations of this but it is not working for me!
awk -F "\"*,\"*" if '{($2 >5) {print $1"," $2} folderone/qlist.txt > folderone/goodlist.txt}'
It is telling me I have a syntax error for if but I do not know how to fix it
What is the correct syntax for this line?
Thanks.