Search Results

Search: Posts Made By: RudiC
2,623
Posted By RudiC
For the wrap around at 9999, tryawk -F, ' ...
For the wrap around at 9999, tryawk -F, '
{$3=sprintf ("%04d", ($3 == $4)?0:($3+1)%1E4)
}
$2!="N"
' OFS=, file
2,623
Posted By RudiC
Try awk -F, ' {$3=sprintf...
Try awk -F, '
{$3=sprintf ("%04d", ($3 == $4)?0:$3+1)
}
$2!="N"
' OFS=, file
2,623
Posted By RudiC
scenario 1. will be met if you double quote the...
scenario
1. will be met if you double quote the "N" (instead of single quoting). Pls note that line 4 will not be read/printed if script exits on line 3, and your output wouldn't match this.
2. is...
Showing results 1 to 3 of 3

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