hi mikrom:
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 ...
Hi mikrom:
I have changed awk code as your recomandation but I got only two lines :
awk -F'[&]' -v RS='[;\n]' 'NF>1{k=$1} {gsub(/;/, "", $NF);print k,",PUT,Uid=",$NF,";"}' tek.txt
result after execution :
ADD=ARGX,FID,Uid=100-31-PAX ,PUT,Uid= 100-447-PAX ;
ADD=ARGX,FID,Uid=100-31-PAX...
hi again:
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 .
awk -F'[,]' -v RS='[&\n]' 'NF>1{k=$1} {gsub(/.{10}/,"& ");gsub(/;/, "", $NF);print k,",PUT,Uid=",$NF,";"}' tek
I have an extra Uid= in first line after...
hi all:
I have a thousand of variable rows in texte file , I took an examlpe of one row :
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&...
hi Mikrom:
sorry for my late response I was sick .
the scipt works fine thanks a lot of .
just last thing can you explain please the script .
for example :
data_nr it is a variable assigned to NR number of recored and in the next block NR == data_nr+1 new assignement with commparison...
hi all:
I have just registred to start a new thread regarding use of awk to parse text file and I' m new in awk language
I took a portion of data from texte file :
DATA
DATA
GHR1
BRAND...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.