Search Results

Search: Posts Made By: RavinderSingh13
2,623
Posted By RavinderSingh13
Hello looney, Could you please try following...
Hello looney,

Could you please try following and let me know if this helps. Let's say we have following Input_file.

cat Input_file
1,Y,1111,9999
2,Y,1,9999
2,N,1,9999
2,Y,9999,9999...
2,623
Posted By RavinderSingh13
Hello looney, Could you please try following...
Hello looney,

Could you please try following and let me know if this helps you.

awk -F, '($2=="N"){next} ($3==$4){$3=0} ($3!=$4){$3=$3+1} {printf "%d,%s,%04d,%d\n",$1,$2,$3,$4}' Input_file
...
Showing results 1 to 2 of 2

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