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
Hi All,
Need help in identifying a shellscript command to remove all files on a server directory, starting with a certain prefix and also older than 3 days.
That means files created with that prefix, today or yesterday, shouldn't be removed.
Thanks,
Dev (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
3. Shell Programming and Scripting
Hi
I need help on this ..!!
Input :
xx_abc_regA
xx_def_regB
xx_qwe_regC
Now i required the output as the below
abc
def
qwe
Need to remove last occurrence of character (_) and rest of the string in Unix (sed).
Thanks in Advance ..!!!
-Nallachand (3 Replies)
Discussion started by: Nallachand
3 Replies
4. Linux
my file input is with tab as delimiter, and in every line, there would be a skip of line with an unexcepted newline breaker. I'd like to remove this \n and put the information in the same line.
INPUT
a1 b1b2 c1
c2 d1
a2 b3 c3 d4
OUTPUT
a1 b1b2 c1c2 ... (9 Replies)
Discussion started by: kinkichin
9 Replies
5. Shell Programming and Scripting
Hi friends,
I am running one SQL though .sh file and in output I am seeing newline whevnever There is a new line in column.
I WANT TO REMOVE NEWLINE IN OUTPUT FILE.
Present out put in Column:
-------------------------
Hi
How
Are
You.
Required output in Column:
-------------
Hi How... (4 Replies)
Discussion started by: crmsachin
4 Replies
6. Shell Programming and Scripting
Hello All,
I am running a command find . -name amp.cfg | cut -c 3- which gives me output something like below
rel/prod/amp.cfg
rel/fld/amp.cfg
deb/detail/amp.cfg
deb/err/amp.cfg I want to remove trailing "/amp.cfg" so that i should get output something like... (7 Replies)
Discussion started by: anand.shah
7 Replies
7. 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
8. 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
9. 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
10. 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