Writing the pattern to a file without the hassles of escaping the quotes worked perfectly fine!
Thanks a ton..
I had escaped both " and ' when I had the regex directly in the command. Wonder why it failed despite using "\"....
Had tried the following:
I'd used both these options to get the OR, but they'd failed.
Thanks
NJ
Last edited by rbatte1; 07-07-2016 at 11:38 AM..
Reason: Code tags
i m trying the following command but its not working:
sed 's/find/\'replace\'/g' myFile
but the sed enters into new line
# sed 's/find/re\'place/g' myFile
>
I havn't any idea how to put single quote in my replace string. Your early help woud be appreciated. Thanx (2 Replies)
Hi Experts...
I am trying to find out separting the records which are staring with double quote(") and a six digit number(ex: 012456,987654,etc) from a file.
For example :
Source File :
"116462","SMITH CHEVR
"164098","SIMPS
"104498","SIMPSONVIL
"Export lments"
"Copyrts... (4 Replies)
Hi,
I search for the string below which contains a single quote,
some text '/home/myuser
in the file myfile.txt as another user with the grep command as follows
su - myuser -c "grep 'some text \'/home/myuser' myfile.txt"
I also tried using two backslashes
su - myuser... (6 Replies)
i want to replace mistaken quotes in line starting with tag 300 and relocate the quote in the correct position so the input is
223;25
224;20100428064823;1;0;0;0;0;0;0;0;8;1;3;9697;18744;;;;;;;;;;;;
300;X;Event:... (3 Replies)
Hello ,
I got html file , these file are normal html as we can see .
what i would like to do is in this html file , i want to print only string start with double quote and end with double quote by line by line.
<tr><td valign=top>25.</td><td><A... (8 Replies)
I need to check whether first character of variable is single quote.
I tried the below constructions but they are all not working (always return true)
if (test `echo "$REGEXP" |cut -c1` != "'"); then echo "TRUE"; fi
if (test `echo "$REGEXP" |cut -c1` != '\''); then echo "TRUE"; fi
if (test... (5 Replies)
Hi Froum.
I have tried in vain to find a solution for this problem - I'm trying to replace any double quotes within a quoted string with a single quote, leaving everything else as is.
I have the following data:
Before:
... (32 Replies)
Hi All ,
We have source data file as csv file and since data could contain commas ,each attribute is quoted into double quotes.However problem is that some of the attributa data also contain double quotes which is converted to double double quote while creating csv file
XLs data :
... (2 Replies)
From:
1,2,3,4,5,This is a test
6,7,8,9,0,"This, is a test"
1,9,2,8,3,"This is a ""test"""
4,7,3,1,8,""""
To:
1,2,3,4,5,This is a test
6,7,8,9,0,"This; is a test"
1,9,2,8,3,"This is a ''test''"
4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Hello,
I'd like to print line if column 5th doesn't match with exm. But to reach there I have to make sure I match single quote.
I'm struggling to match that.
I've input file like:
Warning: Variants 'exm480340' and '5:137534453:G:C' have the same position.
Warning: Variants 'exm480345'... (9 Replies)