hi, i need to parse only the first line of a text file, and i'm trying to come up with a bash script that will first of all enumerate only the first line to the user. i'm trying to use awk to do this, but i can't figure out what i need to do to get it to recognize a new line as the field separator. this is what i have so far:
Code:
awk -F\n '{print $1}' text.txt
the \n doesn't seem to work as i would expect (the full text in the file still gets listed). what is the best way to do this? thanks for any thoughts.