May 26, 2005 #1 dod79 Technical User Joined May 26, 2005 Messages 2 Location 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 Joined Nov 8, 2002 Messages 53,708 Location 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 Joined May 26, 2005 Messages 2 Location 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 Joined Nov 8, 2002 Messages 53,708 Location 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 Joined Apr 17, 2000 Messages 6 Location 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