10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ALL,
file data like :
test.csv
a,b,"c,d"
my awk version is 4.0.2 ,if i am using the below code is working fine.
awk -vFPAT='(*)|("+")' -vOFS="," '{print $3}' test.csv
if the awk version is 3.1.7 is not working . Could you please help me on this one.
output should be : "c,d" (6 Replies)
Discussion started by: bmk123
6 Replies
2. Shell Programming and Scripting
Hi All,
I'm unable to load the data using sql loader where there are double quotes within the double quotes As these are optionally enclosed by double quotes.
Sample Data :
"221100",138.00,"D","0019/1477","44012075","49938","49938/15043000","Television - 22" Refurbished - Airwave","Supply... (6 Replies)
Discussion started by: mlavanya
6 Replies
3. Shell Programming and Scripting
Hello,
Need a AWK command to find and replace Double Quotes in Pipe delimited files
Actully its a CSV file converted to Pipe but the double quotes still exists. So i want to Get rid of them.
Example
Input
1|2|3|sadsad|"Abc Efg 3"""|dada
Output
1|2|3|sadsad|Abc Efg 3"|dada
Thanks... (5 Replies)
Discussion started by: krux_rap
5 Replies
4. UNIX for Dummies Questions & Answers
Want to populate double quotes for each filed using awk:
Input: cat file.txt => "1-23-test_test1-test2"
Required output :
"1-23-test_test1-test2"|"#GT_properties_xyz"
Was trying the below command on solaris 9 machine :
awk -F"|" '{print $1"|""#GT_properties_xyz"}' file.txt
... (8 Replies)
Discussion started by: rajachandhok
8 Replies
5. UNIX for Dummies Questions & Answers
Hi i have to insert the below line into a specific line number of another file
export MBR_CNT_PRCP_TYPE_CODES_DEL="'01','02','04','05','49','55','UNK'"
I have passed the above line to a variable say ins_line. I have used below command to perform the insert
awk 'NR==3{print "'"${ins_line}"'"}1'... (1 Reply)
Discussion started by: sathishteradata
1 Replies
6. Shell Programming and Scripting
Hi,
I have data as
"01/22/97-"aaaaaaaaaaaaaaaaa""aaa""aabbbbbbbbcccccc""zbcd""dddddddddeeeeeeeeefffffff"
I want to remove only the Consequitive double quotes and not the one which occurs single.
My O/P must be ... (2 Replies)
Discussion started by: Bhuvaneswari
2 Replies
7. Shell Programming and Scripting
How do I use double quotes as a record seperator in awk? (4 Replies)
Discussion started by: locoroco
4 Replies
8. Shell Programming and Scripting
Hi,
I am trying to write the following command as an alias in my .bashrc file.
bjobs -u all | awk '{if (NR > 1) {username++;}}END{{print"\nJOBS BY USER:\n"} for (i in username) {print username,i;}{print"\n Total Jobs=",NR-1,"\n" }}'
The command simply puts how many jobs each user is... (2 Replies)
Discussion started by: jacekmaciek
2 Replies
9. Shell Programming and Scripting
The below code is to convert csv file to pipe delimited.
It replaces comma with pipe if it is not in double quotes; If comma is in double quotes it doesnot replace the comma with a pipe.
The code works fine except it eat away the double quotes in the output file.
BEGIN... (6 Replies)
Discussion started by: pinnacle
6 Replies
10. AIX
Hi,
I'm making progress on this but hung up on one last detail. I'd like to use AWK to pass the system date and time(among other things) to the first line of a file.
Here's what I have:
BEGIN {TOTALPP = 0;FREEPP=0;USEDPP=0;print "LPAR NAME:",lpar,"DATE:",tdate }
I call AWK with the... (4 Replies)
Discussion started by: cruiser
4 Replies