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)
hi guys i have 6000 rows column
the text in the column has the symbol vertical bar |.
i tried some of the commands to remove it but none of the commands are reconzng this symbol. would u plz help to remove this symbol from the text with any kind of unix command
u r help would be appreciated
... (9 Replies)
Hi,
I have a requirement to replace the comma's inside the double quotes. The comma's inside the double quotes will get changed dynamically.
Input Record:
"Washington, DC,Prabhu,aju",New York
Output Record:
"Washington| DC|Prabhu|aju",New York
I tried with the below command but it... (3 Replies)
I have a flat file sample like this -
"COURSE"|"ddddd " " dddd"|"sssddd
sdsdsdsdx" dddddddd ffffff
"aaaaa" dddddddd ffffff
sdsdsd"|"xxxxxxx"|
"COURSE"|"ffff " " bbbb"|"lllll"|
The delimiter is pipe character (|) and the text are enclosed in double quotes... (5 Replies)
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)
I have a csv data file :
A,B,C,D,"A,B",E,"GG,H"
E,F,G,H,I,J,"S,P"
I need to replace all "," with "|" except the ones between double quotes i.e
A|B|C|D|"A,B"|E|"GG,H"
E|F|G|H|I|J|"S,P"
CAn someone assist? (8 Replies)
I have a file that looks like this:
102| #2 X 1/4-INCH| 30188| EA| FTW| A| NOT SERIAL TRACKING| NOT LOT TRACKING| TRUE| #2 X 1/4-INCH
102| #2 X 1/4-INCH| 30188| EA| VPS| A| NOT SERIAL TRACKING| NOT LOT TRACKING| TRUE| #2 X 1/4-INCH
102| #6 X 1/2"| ... (2 Replies)
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)
Okay, I would like to delete all the commas in a .CSV file (TEST.CSV) or at least substitute them with empty space, that are enclosed in double quote.
Please see the sample file as below:
column 1,column 2,column 3,column 4,column 5,column 6,column 7,column 8,column 9,column 10... (8 Replies)
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... (1 Reply)
Perl::Critic::Policy::ValuesAndExpressions::ProhibitQuPerl::Critic::Policy::ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters(3pm)NAME
Perl::Critic::Policy::ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters - Don't use quotes ("'", """, "`") as delimiters
for the quote-like operators.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
With the obvious exception of using single-quotes to prevent interpolation, using quotes with the quote-like operators kind of defeats the
purpose of them and produces obfuscated code, causing problems for future maintainers and their editors/IDEs.
$x = q"q"; #not ok
$x = q'q'; #not ok
$x = q`q`; #not ok
$x = qq"q"; #not ok
$x = qr"r"; #not ok
$x = qw"w"; #not ok
$x = qx`date`; #not ok
$x =~ m"m"; #not ok
$x =~ s"s"x"; #not ok
$x =~ tr"t"r"; #not ok
$x =~ y"x"y"; #not ok
$x =~ m'$x'; #ok
$x =~ s'$x'y'; #ok
$x = qr'$x'm; #ok
$x = qx'finger foo@bar'; #ok
CONFIGURATION
This policy has three options: "single_quote_allowed_operators", "double_quote_allowed_operators", and "back_quote_allowed_operators",
which control which operators are allowed to use each of "'", """, "`" as delimiters, respectively.
The values allowed for these options are a whitespace delimited selection of the "m", "q", "qq", "qr", "qw", "qx", "s", "tr", and "y"
operators.
By default, double quotes and back quotes (backticks) are not allowed as delimiters for any operators and single quotes are allowed as
delimiters for the "m", "qr", "qx", and "s" operators. These defaults are equivalent to having the following in your .perlcriticrc:
[ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters]
single_quote_allowed_operators = m s qr qx
double_quote_allowed_operators =
back_quote_allowed_operators =
SUGGESTED BY
Michael Schwern
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.14.2Perl::Critic::Policy::ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters(3pm)