10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I've a requirement like, in a csv file of 30+ fields where all the columns are having double quotes I need to remove the double quotes from certain fields and certain field should remain as it is.
Eg:... (6 Replies)
Discussion started by: Krishnanth S
6 Replies
2. Shell Programming and Scripting
How to remove Carriage Return (CRLF) within double quotes in a file. There are multiple CRLFs within double quotes. We are on Ubuntu 14.04.2 LTS.
The file that we are importing is a csv file from unix to windows and the file was formatted to unix2dos. Therefore all lines in the file all have... (12 Replies)
Discussion started by: covina
12 Replies
3. Shell Programming and Scripting
I have file with are delimited by pipe(|) symbol, I wanted those to be removed except the ones which are enclosed in double quotes.
If your quote file is:
|Life is |Beautiful"|"Indeed life |is beautiful too|"|"But unix is fun| is not"|"
It should return:
Life is Beautiful"|"Indeed life is... (9 Replies)
Discussion started by: Sathyapts
9 Replies
4. Shell Programming and Scripting
In the attached file I am trying to remove all the "" and , (quotes and commas) from $2 and $3 and the "" (quotes) from $4.
I tried the below as a start:
awk -F"|" '{gsub(/\,/,X,$2)} 1' OFS="\t" enhancer.txt > comma.txt
Thank you :). (6 Replies)
Discussion started by: cmccabe
6 Replies
5. Shell Programming and Scripting
Hi,
I am little new to forum and new on unix side. I have a small issue below:
I am reading a file that has 5 columns something like below.
col1,col2,col3,col4,col5
Some records are having double quoted values something like below:
"value1","value2","value3","value4","value5"
I need... (8 Replies)
Discussion started by: Saanvi1
8 Replies
6. UNIX for Dummies Questions & Answers
I would like to know how to replace a space delimiter with a ^_ (\037) delimiter and a double quote delimiter while maintaining the spaces inside the double quotes. The double quote delimiter is only used on text fields.
I'd prefer a one-liner, but could handle a function or script that accepts... (4 Replies)
Discussion started by: SteveDWin
4 Replies
7. Shell Programming and Scripting
How to remove characters enclosed in single quotes?
My data is something like this
(03/22/2011 08:17:26.650) : ( -> '1' -> '1-1-3' -> '6' -> '1' -> 'SALMOR58BB4' aaaaa bbbbbb ccccc ((dddd))
I want the output to be
(03/22/2011 08:17:26.650) : ( -> -> -> -> -> aaaaa... (2 Replies)
Discussion started by: rdhanek
2 Replies
8. Shell Programming and Scripting
Hi,
I have a script which reads the filenames from one file, however that file has the filenames in single quotes.
ex: 'abc.c'
I want to remove the quotes so that the filename should be read as abc.c and not 'abc.c'
Please guide me.
Regards.
Bhushan123 (1 Reply)
Discussion started by: bhushan123
1 Replies
9. UNIX for Advanced & Expert Users
I want to remove the comma which is present within the double quoted string. All other commas which is present outside double quotes should be present.
Input : a,b,"cc,dd,ee",f,ii,"jj,kk",mmm
output : a,b,"ccddee",f,ii,"jjkk",mmm (3 Replies)
Discussion started by: mohan_tuty
3 Replies
10. UNIX for Dummies Questions & Answers
A Triva question.
What is the easy way to remove the double quotes in the file in the following format.
"asdfa","fdgh","qwer"
tr -d '\"' <filename >newfilename
mv newfilename oldfilename
This need to be handled in a script. Any better way to do this. Will sed be more effecient?
One... (3 Replies)
Discussion started by: deepakwins
3 Replies