Search Results

Search: Posts Made By: Scrutinizer
2,733
Posted By Scrutinizer
Just for fun... awk 'NF>n{n=NF}{$n=$n}NR>FNR'...
Just for fun...
awk 'NF>n{n=NF}{$n=$n}NR>FNR' FS=\| OFS=\| file file
2,733
Posted By Scrutinizer
Try: awk -v n=3 '{$n=$n}1' FS=\| OFS=\| file ...
Try:
awk -v n=3 '{$n=$n}1' FS=\| OFS=\| file





--

Setting NF works with gawk and mawk, but not every awk recomputes the record the NF variable. Forcing a recompute with $1=$1 after...
Showing results 1 to 2 of 2

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