I have a string of the form:
"\nFIRST_ITEM\nSECOND_ITEM\nTHIRD_ITEM\n"
When I try to use awk to split it into an array like so,
echo "\nFIRST_ITEM\nSECOND_ITEM\nTHIRD_ITEM\n" | awk '{split($0,a,"\n")}'
The whole string just gets stored as is into a[1]. Could someone please explain why this is happening and how to fix it?