Search Results

Search: Posts Made By: genebuster
Forum: Programming 05-31-2016
1,086
Posted By RudiC
No surprise "it does not work" (whatever that...
No surprise "it does not work" (whatever that might be). ALL lines have 7 fields only (unless this is an artefact introduced by copy/pasting), so nothing CAN be printed. On top, you are "trying to...
7,525
Posted By Akshay Hegde
awk 'NF { $3 = $2 + 1000 }1' OFS='\t' file ...
awk 'NF { $3 = $2 + 1000 }1' OFS='\t' file

---------- Post updated at 09:29 PM ---------- Previous update was at 09:22 PM ----------

If suppose in case you want to keep source formating you can...
7,525
Posted By Akshay Hegde
Like this ? awk 'NF { $3 = $2 + 1000 }1' file
Like this ?

awk 'NF { $3 = $2 + 1000 }1' file
7,525
Posted By RavinderSingh13
Hello genebuster, Following may help. ...
Hello genebuster,

Following may help.


awk '($3=$2+1000) 1' Input_file


Assuming like your file not having any empty lines init.

Thanks,
R. Singh
Showing results 1 to 4 of 4

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