I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
This works fine. But i have around 50(or more in the future) different values for C such as 12C, 13C, 18C, 19C, 26C, ... I don't want to hard-code these values with the "||" clause in the above if condition.
Is there a way i can store this in a variable array. or in a variable as a string and manage to check for this condition ??
I tried writing an AWK block, etc to manage this, but to no success.
Please help me on this.