Search Results

Search: Posts Made By: etldev
11,463
Posted By etldev
thanks blastit but unfortunately my requiremenst...
thanks blastit but unfortunately my requiremenst dont allow me to do a xml and thhe conversion..I ahve figured out how to prevent the dropping of leading zeroes but I need a SED code that would work...
11,463
Posted By etldev
the sed code seems to be working fine but its...
the sed code seems to be working fine but its throwing me off when the data contains double quotes within them .I have attached picture of what I am talking about.sed 's/|/","/g; s/^/"/; s/$/"/'...
11,463
Posted By etldev
the sed code works fine but the only issue I am...
the sed code works fine but the only issue I am faced with now is when the pipes are being converted to commas i.e when my file is made csv and when opened using Microsoft excel I am losing the...
11,463
Posted By etldev
2 things Don 1)I still dint get the AWk...
2 things Don

1)I still dint get the AWk working both for (q and nq).I also tried the awk -F'[|]' -v OFS='","' 'NF{$1 = $1; $0 = "\"" $0 "\""}1' A4.txt > A5q.csv.dont know if its somethng to do...
11,463
Posted By etldev
I have attched the input A4.txt . When I run...
I have attched the input A4.txt .

When I run the big awk commnd the one which takes care of quotes my output is A5.txt-which is attached but when I run the other awk my output is same as A4.txt
11,463
Posted By etldev
neither of these above AWK codes are giving me...
neither of these above AWK codes are giving me desired output as I could still see PIPES as field delims but not commas...

however the awk code which takes care of quotes and comas is just putting...
11,463
Posted By etldev
Hey Don Much thanks for looking into this.I...
Hey Don

Much thanks for looking into this.I am using AIX 7.2.I dont think length of line is a problem and is very well within limits.I tried the AWk you suggested and I got an error.

A.txt is...
11,463
Posted By etldev
another thing I forgot to mention is I dont know...
another thing I forgot to mention is I dont know pre hand how many fields exist in the file meaning A2.txt can have 0-n number of fields ..The file A2.txt might have any number of variable fields.
11,463
Posted By etldev
How to cut a pipe delimited file and paste it with another file to form a comma separated outputfile
Hello ppl

I have a requirement to split (cut in unix) a file (A.txt) which is a pipe delimited file into A1.txt and A2.txt

Now I have to join (paste in unix) this A2.txt with external file...
Showing results 1 to 9 of 9

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