Can you post a sample of file1.txt? Backticks ( ` ) execute what is between them first. Since XYZ is not a command, you might have to escape the command, i.e. put a \ in front of each backtick. See below:
Is that what you want it to do?
Last edited by blakeoft; 04-02-2014 at 03:14 PM..
Reason: merged incomplete sentences and corrected some code
I have a csv file with lines like the followings
123456,"ABC CO., LTD","XXX"
789012,"DEF LIMITED", "XXX"
before I bcp this file to database, the comma in "CO.," need to be removed first.
My script is cat <filename> | sed 's/"CO.,"/"CO."/g'
but it doesn't work. Can anyone here able to... (2 Replies)
Hi All,
I have a tab delimited file where each of the strings have double quotes.
The problem is that I have records which are in the following format:
"TEXAS" ""HOUSTON"" "123" "" "2625-39-39"
""MAINE"" "" "456" "I" "3737-39-82"
I would have to output... (3 Replies)
Hello,
I am using csh to read a text file and save its words into variable $word in a foreach loop. These words have small back quotes ` as integral parts of them, for example, one word would be `abc`, another would be `xyz1` etc... These quotes are always the first and last characters of the... (5 Replies)
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)
I have not seen anything yet in your forum to answer this problem.
Here is my sed command.
I want to change
Build Apache module" off
to
Build Apache module" on
This is what I am trying.
sed "s_Build Apache module\" off_Build Apache module\" on_" /usr/ports/lang/php5/Makefile... (9 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)
Hello everyone,
I am working on a file with thousands of lines and instead of manually removing them I need a script to remove quotes within quotes. For example a line may have something such as this:
"Hey, I was ready to go on stage or "break a leg", but I failed miserably."
So I need to... (15 Replies)
Hi,
Text file has DEL character(ASCII code 127) as quotes with comma as field delimiter. If any of the field contains new line character then I need to remove it. Please help me to achieve this.
Thanks
Vikram (4 Replies)
Hi I have a .csv file and when opened in notepad looks like this
gggg,nnnn,"last,first","llll""",nnn
So, Here I would like the ouput as below
gggg,nnnn,"last,first","llll",nnn
i.e replace all two double quotes into one. How could I do that?
This file is being processed by another... (5 Replies)
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)