May 26, 2005 #1 dod79 Technical User May 26, 2005 2 FR hello i just have data like this 20000011145257 4 4356 and I need a for mat like this 2000 00 11 14 5257 4 4356 colud you please help me?? best wishes
hello i just have data like this 20000011145257 4 4356 and I need a for mat like this 2000 00 11 14 5257 4 4356 colud you please help me?? best wishes
May 26, 2005 #2 PHV MIS Nov 8, 2002 53,708 FR In the awk man page pay attention to the substr function. Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
In the awk man page pay attention to the substr function. Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
May 26, 2005 Thread starter #3 dod79 Technical User May 26, 2005 2 FR thank you for help but I tried the substr option but I couldnt change the format( Upvote 0 Downvote
May 26, 2005 #4 PHV MIS Nov 8, 2002 53,708 FR Why not posting your actual code ? Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
Why not posting your actual code ? Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
May 31, 2005 #5 Chube Programmer Apr 17, 2000 6 ES awk ' { printf "%s %s %s %s %s %s %s\n",substr($1,1,4),substr($1,5,2),substr($1,7,2),substr($1,9,2),substr($1,11),$2,$3; } ' file.txt Upvote 0 Downvote
awk ' { printf "%s %s %s %s %s %s %s\n",substr($1,1,4),substr($1,5,2),substr($1,7,2),substr($1,9,2),substr($1,11),$2,$3; } ' file.txt