AWK problem involving parameters in Bash
I'm pretty new to awk so I'm having a hard time understanding why this doesn't work like I think it should...
I have a properties file that will be used to store information that will be retreived with awk: Code:
-field1 Code:
!# /bin/bash value1 value2 value3 value4 ... Instead, the output I'm getting is this... value1 -field1 value2 -field1 value3 -field1 value4 ... Clearly, I'm either missing or don't understand something, but I have no idea what it is or where to look. Thanks in advance for any input given. |
RS is the Record Seperator
So if you take your first entry where you pass '-field1', your file you then have 2 records. One in front of the RS which is null hence the blank line printed at the start and then the first field up until FS which is value1 Hope that helps |
All times are GMT -5. The time now is 07:29 PM. |