Search Results

Search: Posts Made By: MomoChan
4,590
Posted By MomoChan
Well,. I came with this solution, but litle bit...
Well,.
I came with this solution, but litle bit messy i think

set -A dlm -- 5 12 17
inc=0
while [ $inc -lt ${#dlm
} ] ; do
cmd="$cmd s/^(.{${dlm[$inc]}}),(.*)/\1;\2/g ;"
let inc=inc+1...
4,590
Posted By MomoChan
but the result not match with requirement,. the...
but the result not match with requirement,.
the script u gave same like i use
tr ',' ';'

is there any clues to change commas in specified position within a line??
4,590
Posted By MomoChan
anybody can help??
anybody can help??
4,590
Posted By MomoChan
in my input sample aaaa,aaa,aa,aaaa,aaaa aa ...
in my input sample
aaaa,aaa,aa,aaaa,aaaa aa

i just want to change commas in position 5,12,17 into semicolon..
no change in data

i try to make an array and make a script, see below

set -A...
4,590
Posted By MomoChan
not change the 'a' letter to 'c' like u mention...
not change the 'a' letter to 'c' like u mention above,.
and i modify to
echo "aaaa,aaa,aa,aaaa,aaaa aa" | awk -F "," '{printf "%s;%s%s;%s;%s,%s\n", $1,$2,$3,$4,substr($5,0,4),substr($5,6,2)}'
...
4,590
Posted By MomoChan
what i'm concern is, replace all commas delimiter...
what i'm concern is, replace all commas delimiter to semicolon except several column
e.g
i have a file contains two lines:
aaaa,aaa,aa,aaaa,aaaa aa
cccc,ccccc ,cccc,cccc,cc

and i want change...
4,590
Posted By MomoChan
subtitute specific column in line
Hi All,
I have problem to solve
aaaa,aaaaa,aaa,aaaa,aaa,aa ,aa
bbbb,bbbbbbbbb,bbbb,bbbbb ,bb

to
aaaa;aaaaa,aaa ;aaaa;aaa,aa ;aa
bbbb;bbbbbbbbb;bbbb;bbbbb ;bb

i try use sed to find and...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 07:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy