Oct 18, 2004 #1 CooperS Technical User Aug 19, 2002 7 GB I have a datafile 1000 sandstone 1010 clay 1015 salt 1020 salt I want to process this file to create the following output 1001 1010 sandstone 1010 1015 clay 1015 1020 salt I would appreciate any suggestions as to how to achieve this with sed/awk Thank you
I have a datafile 1000 sandstone 1010 clay 1015 salt 1020 salt I want to process this file to create the following output 1001 1010 sandstone 1010 1015 clay 1015 1020 salt I would appreciate any suggestions as to how to achieve this with sed/awk Thank you
Oct 18, 2004 Thread starter #2 CooperS Technical User Aug 19, 2002 7 GB REVISION This is the required output (1000 not 1001) 1000 1010 sandstone 1010 1015 clay 1015 1020 salt Upvote 0 Downvote
REVISION This is the required output (1000 not 1001) 1000 1010 sandstone 1010 1015 clay 1015 1020 salt
Oct 18, 2004 1 #3 PHV MIS Nov 8, 2002 53,708 FR Something like this ? awk '{if(NR>1)print s,$1,t;s=$1;t=$2}' /path/to/input Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
Something like this ? awk '{if(NR>1)print s,$1,t;s=$1;t=$2}' /path/to/input Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244