Dec 18, 2006 #1 sabetik IS-IT--Management Nov 16, 2003 80 GU Is there a way to insert a tab (5 spaces) between each field. I would like to change the "," to 5 spaces. This is my input file: pn,description,price AU015-, O/M 6FGCU33-45,4.96 AU315-1, O/M 7FBH15-25,5.15 AU317-, O/M 7FBCU15-55,5.15
Is there a way to insert a tab (5 spaces) between each field. I would like to change the "," to 5 spaces. This is my input file: pn,description,price AU015-, O/M 6FGCU33-45,4.96 AU315-1, O/M 7FBH15-25,5.15 AU317-, O/M 7FBCU15-55,5.15
Dec 18, 2006 #2 PHV MIS Nov 8, 2002 53,708 FR Why not a simple sed ? sed 's!,! !g' /path/to/input > output 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 a simple sed ? sed 's!,! !g' /path/to/input > output Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Dec 18, 2006 Thread starter #3 sabetik IS-IT--Management Nov 16, 2003 80 GU PH. Do not have access to sed. How about awk Upvote 0 Downvote
Dec 18, 2006 #4 vgersh99 Programmer Jul 27, 2000 2,146 US wow that's something new - a system with 'awk', but with no 'sed'. What OS is that? Code: nawk -F',' -v OFS=' ' '$1=$1' myInputFile vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
wow that's something new - a system with 'awk', but with no 'sed'. What OS is that? Code: nawk -F',' -v OFS=' ' '$1=$1' myInputFile vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+