split row by group of ten in each row splited
split row by group of ten in each row splited
(OP)
hi all:
I have a thousand of variable rows in texte file , I took an examlpe of one row :
I have used this piece of awk code to parse the text file but I didn't get what I want :
I want to get this :
thanks for your help and support
I have a thousand of variable rows in texte file , I took an examlpe of one row :
CODE --> awk
ADD=ARGX,FID,Uid=100-31-PAX&100-41-PAX&100-57-PAX&100-65-PAX&100-77-PAX&100-119-PAX&100-175-PAX&100-194-PAX&100-225-PAX&100-257-PAX&100-262-PAX& 100-271-PAX&100-287-PAX&100-289-PAX&100-345-PAX&100-361-PAX&100-415-PAX&100-436-PAX&100-447-PAX100-28-PAX;
I have used this piece of awk code to parse the text file but I didn't get what I want :
CODE --> awk
awk -F'[,]' -v RS='[&\n]' 'NF>1{k=$1} {gsub(/;/, "", $NF);print k,",PUT,Uid=",$NF,";"}'
I want to get this :
CODE --> awk
ADD=ARGX,FID,Uid=100-31-PAX&100-41-PAX&100-57-PAX&100-65-PAX&100-77-PAX&100-119-PAX&100-175-PAX&100-194-PAX&100-225-PAX&100-257-PAX; ADD=ARGX,FID,Uid=100-262-PAX&100-271-PAX&100-287-PAX&100-289-PAX&100-345-PAX&100-361-PAX&100-415-PAX&100-436-PAX&100-447-PAX&100-28-PAX;
thanks for your help and support
RE: split row by group of ten in each row splited
RE: split row by group of ten in each row splited
I want to split my line after (10th of &).
my awk code create 20 lines , I want only two which conatin 10 of & and so on .
CODE --> awk
I have an extra Uid= in first line after split i don't want it .
CODE --> awk
this what I want :
CODE --> awk
RE: split row by group of ten in each row splited
RE: split row by group of ten in each row splited
CODE
RE: split row by group of ten in each row splited
I have changed awk code as your recomandation but I got only two lines :
CODE --> awk
result after execution :
CODE --> awk
I 'm sorry to ask you this can you post your awk code ?
thanks
RE: split row by group of ten in each row splited
seifou45_01.awk
CODE
Try it!
RE: split row by group of ten in each row splited
seifou45_01.txt
CODE
and the result of this command:
CODE
produced this output file with 4 shorter lines:
seifou45_out.txt
CODE
RE: split row by group of ten in each row splited
RE: split row by group of ten in each row splited
Sorry for my delay I'll test it and Get back To you.
Thanks a lot of.
RE: split row by group of ten in each row splited
it works fine but I did a big mistakes in my description of my texte file .
sorry I didn't pay attention .
have a look on the newest data .
CODE --> awk
the first field change after ADD= and I need it in the second line .
I need bellow output:
CODE --> awk
sorry again and thanks a lot of
RE: split row by group of ten in each row splited
ADD=ARGX,FID,Uid=
ADD=VRRP,FID,Uid=
.. etc
RE: split row by group of ten in each row splited
The problem is located in second Line
They must follow the first one for All lines splitted after 10th .
RE: split row by group of ten in each row splited
RE: split row by group of ten in each row splited
CODE
Output:
CODE
RE: split row by group of ten in each row splited
RE: split row by group of ten in each row splited
100000000000000000000 thanks .
it works fine
RE: split row by group of ten in each row splited