10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am trying to do some transformation on a large file and I am getting some troubles trying remove newlines only when the last character of a line is a symbol (in this case is a pipe "|").
I have tried with sed like this:
sed -i 's/|\n/|/g' my_file
or
sed -i 's/|$/|/gg' my_file... (5 Replies)
Discussion started by: ngb
5 Replies
2. UNIX for Dummies Questions & Answers
Hi All, Hoping someone can help....
I am trying to work out how I can ammend a log file to remove variable strings in order to remove confidential information which I cant pass on.
As an example I have used phone numbers. A large log file contains multiple lines containing something like the... (6 Replies)
Discussion started by: mutley2202
6 Replies
3. Shell Programming and Scripting
Hello All
I have had a requirement where I need to move data to a new line based on a text
Input
:61: 456 B66666 :61: 878 N78777 :61: 534533534 BNNN
Output
:61: 456 B66666
:61: 878 N78777
:61: 534533534 BNNN
So basically as soon as it encounters :61: it should... (3 Replies)
Discussion started by: kamijia83
3 Replies
4. Shell Programming and Scripting
I have a string like below:
{\rtf1\fbidis\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}{\f1\fnil MS Sans Serif;}}
\viewkind4\uc1\pard\ltrpar\lang2057\f0\fs16 19/11/2010 SOME DESCRIPTION. \par
\lang1033\f1\par
}
I have to replace the newline character with null in the... (8 Replies)
Discussion started by: Pratik4891
8 Replies
5. Shell Programming and Scripting
i am having text file below
System will display value URGENT and proceed
System will display value URGENT and proceed
System will display value URGENT and proceed
.................................................................. (1 Reply)
Discussion started by: suryanarayana
1 Replies
6. Shell Programming and Scripting
Hi,
I'm struggling with a string replacement.
I have an XML file which is in the following layout
<FUNCTION>
<PRODUCTS>
<PRODUCT CODE="PRODUCE" ACTION="amend" VALIDATE="no">
<SUPPLIER PRODUCT="PRODUCT" ACTION="amend" CODE="SUPPLIER">
<STOCK_QUANTITY DATA="21"/>
... (15 Replies)
Discussion started by: Ste_Moore01
15 Replies
7. Shell Programming and Scripting
Hi, I'm very new to shell scripting and have searched google and this forum for quite some time now.
I have the following in my xml file:
<recipients>
<member>value1</member>
</recipients>
I need to find a string <recipients> that follows with a new-line and bunch of spaces and... (5 Replies)
Discussion started by: mgharios
5 Replies
8. Shell Programming and Scripting
Hi all
I have the problem to substitute a string with newline in Perl. Can anybody help me?
And also how to replace a string with opening bracket (e.g. (START ) with a whitespace/null character?
Thanks in advance. (1 Reply)
Discussion started by: my_Perl
1 Replies
9. UNIX for Dummies Questions & Answers
Hi.
How to replace a text in a file with starting from a newline
example====
shashi how r u ? shashi , r u their? shashi....
shashi hello shashi
output will be
shashi how r u ?
shashi , r u their?
shashi....
shashi hello
shashi
=========
thanks in advance.. (3 Replies)
Discussion started by: hegdeshashi
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I wanted to replace these lines in vi editor:
input--
uid=ESVPEME | eriMasterDomain=EAMCS | eriCountry=El | ou=ESV
uid=EPYCAR | eriMasterDomain=EAMCS | eriCountry=Argentina | ou=CEA
uid=ERCFGA | eriMasterDomain=EAMCS | eriCountry=Costa | ou=ERC
uid=EDGLUCU | eriMasterDomain=EAMCS... (5 Replies)
Discussion started by: hegdeshashi
5 Replies