Sponsored Content
Top Forums Shell Programming and Scripting Removal of comma(,) present inbetween double quotes(" ") Post 302335072 by quintet on Friday 17th of July 2009 07:26:47 AM
Old 07-17-2009
Hello vsairam,

radoulov solution works fine. But if you are looking for sed version, then here you go:

Code:
sed -e ':a' -e 's/\("[^"]*\),\([^"]*"\)/\1~\2/;ta' test.txt

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comparing scalars contaning "DOUBLE QUOTES" as data

Hello to all, Does anyone know the solution ? Two strings A and B are present. I want to check whether B is a Substring of A. 1. The value of A is - 29 * * * /bin/ls "test" "tmp*" "log*" (Note: Pl note that A contains DOUBLEQUOTES, ASTERISK & FRONTSLASH) 2. The value of B is -... (5 Replies)
Discussion started by: rssrik
5 Replies

2. Shell Programming and Scripting

Removal of new line character in double quotes

Hi, Could you please help me in removal of newline chracter present in between the double quotes and replacing it with space. For example ... Every field is wrapped with double quotes with comma delimiter, so I need to travese from first double quote occerence to till second double... (7 Replies)
Discussion started by: vsairam
7 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. Shell Programming and Scripting

Substituting comma "," for dot "." in a specific column when comma"," is a delimiter

Hi, I'm dealing with an issue and losing a lot of hours figuring out how i would solve this. I have an input file which looks like this: ('BLABLA +200-GRS','Serviço ','TarifaçãoServiço','wap.bla.us.0000000121',2985,0,55,' de conversão em escada','Dia','Domingos') ('BLABLA +200-GRR','Serviço... (6 Replies)
Discussion started by: poliver
6 Replies

5. Shell Programming and Scripting

Expect scripting - How to match a double quotes " "

I am trying to match a text which contains the " ", from the log file. But it doesn't match. I understand that " " has got a special meaning to TCL/Expect. hence I tried the following, but no luck. expect -ex { "lp -c -demail -ot\\\"firstname_surname@gmail.com\\\"... (3 Replies)
Discussion started by: prakasuj
3 Replies

6. Shell Programming and Scripting

awk print - fields separated with comma's need to ignore inbetween double quotes

I am trying to re-format a .csv file using awk. I have 6 fields in the .csv file. Some of the fields are enclosed in double quotes and contain comma's inside the quotes. awk is breaking this into multiple fields. Sample lines from the .csv file: Device Name,Personnel,Date,Solution... (1 Reply)
Discussion started by: jxrst
1 Replies

7. Shell Programming and Scripting

Replacing double quotes with the unicodes "urgent!"

Hi, I have the following text in a file <div class="snippet abstract"> We present a new "model" for multiple-input-multiple-output (MIMO) 'outdoor' has many things "what" ever </div></a href=sdfkkf"> </div> <div class="snippet context"> I have to replace the string between the <div... (1 Reply)
Discussion started by: vms
1 Replies

8. Shell Programming and Scripting

Removal of comma within double quotes

Hi All, I am getting .csv file whenever there is a comma present between a field that field get enclosed with double quotes For eg as below abc,123,xxyy,2178 fgh,123,"x,x"yy",2178 ghi,123,"x,xyy",2178 jkl,123,xx"yy,2178 whereas I want my data as per below abc,123,xxyy,2178... (1 Reply)
Discussion started by: H_bansal
1 Replies

9. Shell Programming and Scripting

Removal of multiple characters with in double quotes

For one of my need I was going through post "Removal of new line character in double quotes" Which alister has replied like $ cat data "leave me alone" "ABCD RENT-A- CAR XYZ LTD","00N0H","Enterprise Lake"," 100 View Way" $ sed -n 'H;g;/^*"*\("*"*\)*$/d; s/^\n//; y/\n/ /; p; s/.*//; h'... (9 Replies)
Discussion started by: Jag_1981
9 Replies

10. Shell Programming and Scripting

awk to parse comma separated field and removing comma in between number and double quotes

Hi Experts, Please support I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6. ... (3 Replies)
Discussion started by: as7951
3 Replies
Perl::Critic::Policy::Variables::ProhibitPerl4PackageNamUser)Contributed Perl DocumenPerl::Critic::Policy::Variables::ProhibitPerl4PackageNames(3)

NAME
Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames - Use double colon (::) to separate package name components instead of single quotes ('). AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Perl 5 kept single quotes ("'") as package component separators in order to remain backward compatible with prior "perl"s, but advocated using double colon ("::") instead. In the more than a decade since Perl 5, double colons have been overwhelmingly adopted and most people are not even aware that the single quote can be used in this manner. So, unless you're trying to obfuscate your code, don't use them. package Foo::Bar::Baz; #ok package Foo'Bar'Baz; #not ok CONFIGURATION
This Policy is not configurable except for the standard options. SEE ALSO
perlmod AUTHOR
Elliot Shank "<perl@galumph.com>" COPYRIGHT
Copyright (c) 2007-2011 Elliot Shank. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.16.3 2014-06-09 Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames(3)
All times are GMT -4. The time now is 04:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy