04-04-2013
I have tried and it dint work.
Sample file :
X|1233456|1|YVH|<P>This is a test </P>
<P>This is a test </P>
<P>This is a test</P>|<P>This is a test</P>
<P>This is a test</P>
<P>This is a test</P>|<P>This is a test</P>
<P>This is a test</P>
<P>This is a test</P>|||||||||
It is a large file has 100k rows and I see atleast 2000 rows having this type of issue.
Expected file :
X|1233456|1|YVH|<P>This is a test </P><P>This is a test </P><P>This is a test</P>|<P>This is a test</P><P>This is a test</P><P>This is a test</P>|<P>This is a test</P><P>This is a test</P><P>This is a test</P>|||||||||
Thanks for your replies
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I have this type of files:-
BGH.28OCT2008.00000001.433155.001
BGH.28OCT2008.00000002.1552361.001
BGH.28OCT2008.00000003.1438355.001
BGH.28OCT2008.00000004.1562602.001
Inside them contains the below:
5Discounts
6P150 - Max Total Usage RM150|-221.00
P150 EPP - Talktime RM150... (5 Replies)
Discussion started by: olloong
5 Replies
2. Shell Programming and Scripting
Hi,
How to remove duplicate lines in the file.
a
------
b
c
24
23
a
----
c
b (4 Replies)
Discussion started by: sandy1028
4 Replies
3. Shell Programming and Scripting
is there a way with sed to removed more than one set of lines in one line?
so i mean
sed ${firstElem},${lastIndex}d web.xml > web1.xml
this will delete lines between ${firstElem},${lastIndex}
i want in the same line to do somethinkg like this (doesn't work so far)
sed... (3 Replies)
Discussion started by: Poki
3 Replies
4. Shell Programming and Scripting
Hi,
I have a file containing the DDLs of tables in a schema. From that I need to remove all the lines from a starting string till a specific string. Here is an example.
File1.txt
-------------
CREATE TABLE "SCHEMA1"."LKP11_TBL_USERS"
( "ID" NUMBER(8,0) NOT NULL ENABLE,
"USER_ID"... (3 Replies)
Discussion started by: satyaatcgi
3 Replies
5. Shell Programming and Scripting
Hi,
I have a file content as below.
Table : PAYR
Displayed fields: 15 of 15 Fixed columns: 4 List width 0999... (4 Replies)
Discussion started by: shirdi
4 Replies
6. Shell Programming and Scripting
Hi
I have a text file named main.txt with 10,000 lines. I have another file with a list of line numbers (around 1000) of the lines to be deleted from main.txt file.
I tried with sed but it removes only a range of line numbers.
Thanks for any help!! (1 Reply)
Discussion started by: prvnrk
1 Replies
7. Shell Programming and Scripting
Not sure how I can accomplish this. I would like to remove all interfaces that have the commands I would like to see: switchport port-security, spanning-tree portfast. One line is no problem.
interface FastEthernet0/8
spanning-tree portfast
interface FastEthernet0/9
spanning-tree... (4 Replies)
Discussion started by: mrlayance
4 Replies
8. Shell Programming and Scripting
GM,
I have an issue at work, which requires a simple solution. But, after multiple attempts, I have not been able to hit on the code needed.
I am assuming that sed, awk or even perl could do what I need.
I have an application that adds extra blank page feeds, for multiple reports, when... (7 Replies)
Discussion started by: jxfish2
7 Replies
9. Shell Programming and Scripting
I want to clean a html file.
I try to remove the script part in the html and remove the rest of tags and empty lines.
The code I try to use is the following:
sed '/<script/,/<\/script>/d' webpage.html | sed -e 's/<*>//g' | sed '/^\s*$/d' > output.txt
However, in this method, I can not... (10 Replies)
Discussion started by: YuhuiFeng
10 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I came across one issue recently where output from one of the columns of the table from where i am creating input file has newline characters hence, record in the file is spread over multiple lines. Fields in the file are separated by pipe (|) delimiter. As header will never have newline... (4 Replies)
Discussion started by: Prathmesh
4 Replies