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:
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 -F'[,]' -v RS='[&\n]' 'NF>1{k=$1} {gsub(/;/, "", $NF);print k,",PUT,Uid=",$NF,";"}'
I want to get this :
Code:
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