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. UNIX for Dummies Questions & Answers
Hi,
I've been trying to work out how to add a new line to a file when the pattern matches .dmg.
I've been searching Google but yet not found a working solution.
Help would be appreciated... (9 Replies)
Discussion started by: pburge
9 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 want to remove a certain pattern when i type pwd.
pwd will look like this:
..../....../....../Pat_logs/..../....../...../......
the dotted lines are just random directory names,
i want it to remove the "Pat_logs/...../....../....../" part
so for example:
... (8 Replies)
Discussion started by: a27wang
8 Replies
6. Shell Programming and Scripting
Hi,
i want to remove a certain pattern when i type pwd.
pwd will look like this:
..../....../....../Pat_logs/..../....../...../......
the dotted lines are just random directory names,
i want it to remove the "Pat_logs/...../....../....../" part
so for example:
... (5 Replies)
Discussion started by: a27wang
5 Replies
7. 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
8. Shell Programming and Scripting
If we assume that each line between the {} container is an XML document then What I want to remove the newline character from all lines within each container to have one XMDL document per line I wrote a bit of sed after trawling the web:
e.g.
#!/bin/sed -nf
H
/}/ {
x
s/\n//g
p... (3 Replies)
Discussion started by: JamesJSC
3 Replies
9. Shell Programming and Scripting
I have been search all over the internet to find a solution to this.
I have a file that looks like:
-a ItemConfig.custom=true
-a Config.custom=true
go -t malu
-t Use=true
I want to get "malu" as output, and the werid thing is the blank before go is neither space nor tab.
what's the sed... (4 Replies)
Discussion started by: katrvu
4 Replies
10. Shell Programming and Scripting
Hello All,
I have log file the result from a multithreaded process. So when a process finishes it will write to this log file as 123 rows merged.
The issue is sometimes the processess finish at the same time or write to the file at the same time as
123 rows merged.145 rows merged.
At... (5 Replies)
Discussion started by: ssikhar
5 Replies