Re: fixed-size records
- From: run_signature_script_for_my_email@xxxxxxxxxxx (laura fairhead)
- Date: Fri, 10 Mar 2006 22:57:53 +0000 (UTC)
On 9 Mar 2006 03:05:46 -0800, gioparl@xxxxxxxxx wrote:
=CE=9F/=CE=97 Vino =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5:
hello!sed -e "s_ \([^ ]\)_,\1_g"
I have some files with fixed-size records
george jenny lina
I want to convert to
george ,jenny ,lina
how can do it?sed&awk??any help?
p.s. it's spaces between fields,not tabs.
thanks a lot! it works:)
but if a field contains two strings seperated by a space?
I would like to use it with parameters(positions)
is there a way to use positions
position 23,56,88 insert a comma
something like that
Here's a 'sed' solution;
If you wanted to insert the commas instead
of replacing them, work from back to front
to keep the earlier positions the same;
echo moc.12klat@daehriaf_arual|sed 's/\(.\)\(.\),*/\2,\1/g;h;s/,//g;/@t/q;G;D'
- Prev by Date: Re: search and replace end of line?
- Next by Date: Re: removing duplicate fields within a column... should be pretty simple
- Previous by thread: Re: fixed-size records
- Next by thread: Re: fixed-size records