Search Results

Search: Posts Made By: KomjongShawn
2,868
Posted By Scrutinizer
You need to specify the field separator before...
You need to specify the field separator before you start reading the first line, not during..
e.g.
awk -F, '{print $1; exit}' infile
awk '{print $1; exit}' FS=, infile
awk -v FS=, '{print $1;...
2,868
Posted By pravin27
How about this ? gawk -F"," 'NR == 1 {print...
How about this ?
gawk -F"," 'NR == 1 {print $1}' inputfile
2,868
Posted By elixir_sinari
You are setting the FS variable inside an action...
You are setting the FS variable inside an action statement when awk/gawk has already read in the first line and decided on the fields based on the current value of FS (which was none). Hence, $1 will...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 11:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy