10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Greetings Experts,
I am in AIX; I have a file generated through awk after processing the input files. Now I need to replace or remove the new-line characters on all lines that doesn't have a ; which is the last character on the line. I tried to use sed 's/\n/ /g' After checking through the... (6 Replies)
Discussion started by: chill3chee
6 Replies
2. Shell Programming and Scripting
I need to remove ] followed by newline character to convert lines like:
line1]
line2
into:
line1line2 (4 Replies)
Discussion started by: locoroco
4 Replies
3. Shell Programming and Scripting
I'd like to remove (do a pattern or precise replacement - this I can handle in SED using Regex )
---AFTER THE 1ST Occurrence ( i.e. on the 2nd occurrence - from the 2nd to fourth occurance ) of a specific string : type 1
-- After the 1st occurrence of 1 string1 till the 1st occurrence of... (4 Replies)
Discussion started by: sieger007
4 Replies
4. Shell Programming and Scripting
I have a file (test.dat) which contains data like this
459|199811047|a |b |shan
kar|ooty|
460|199811047|a |bv |gur
u|cbe|
but I need it like:
459|199811047|a |b |shankar|ooty|
460|199811047|a |b |guru|cbe|
While reading the data from this file, I don't want to remove newline from the end of... (4 Replies)
Discussion started by: jcrshankar
4 Replies
5. Shell Programming and Scripting
Hi,
I have input file contains sql queries i need to eliminate newlines from it.
when i open it vi text editor and runs
:%s/'\n/'/g
it provides required result. but when i run sed command from shell prompt it doesn't impact outfile is still same as inputfile.
shell] sed -e... (6 Replies)
Discussion started by: mirfan
6 Replies
6. Shell Programming and Scripting
Hello,
I'm trying to create a muliti value shell variable with newlines inside it, So that I can read the values of that variable individually line by line, but KSH seems to be stripping my variable of newlines in LINUX, but UNIX its working fine.
Here's Example :
String =... (3 Replies)
Discussion started by: Sanju1236
3 Replies
7. Shell Programming and Scripting
Hi,
I have the following XML not well-indented code:
<hallo
>this is a line
</hallo>
So I need to remove the newline.
This syntax finds what I need to correct, but I don't know how to remove the newline after my pattern:
sed 's/<.*$/&/'
How can I subtract the newline after my... (1 Reply)
Discussion started by: nico.ben
1 Replies
8. Shell Programming and Scripting
how to remove all tabs and newline (\n) from the exicting file (2 Replies)
Discussion started by: pvr_satya
2 Replies
9. Shell Programming and Scripting
Hi,
I did the below.
$ print "\\n"
$
I am curious, why does \\n give two new lines? I would have thought that the first \ would escape the second \, and so we'd get \n printed. But we didn't.
Any ideas?
Thanks. (7 Replies)
Discussion started by: JamesByars
7 Replies
10. Shell Programming and Scripting
Newline character "\n" not working for ksh in linux AS 3.0
Command :
$echo "Hi\nHi"
$Hi\nHi
$
Expected output :
$echo "Hi\nHi"
Hi
Hi
$
Can some help me on this
Thanks in advance
Sanish. (11 Replies)
Discussion started by: sanikv
11 Replies