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
Below i am trying to remove "/" and "r" from the output, so i need output as:
hdiskpower3
hdisk0
hdisk1
#inq | grep 5773 | awk '{print $1}' | sed 's/dev//g' | awk -F"/" '{$1=$1}1'
.....................................................//rhdiskpower0
//rhdiskpower1
//rhdiskpower2... (3 Replies)
Discussion started by: aix_admin_007
3 Replies
3. Shell Programming and Scripting
Dear All,
Can anyone help to remove the , bewteen "" in a string by using sed or awk?
e.g.
input : 1,4,5,"abcdef","we,are,here",4,"help hep"
output:1,4,5,"abcdef","wearehere",4,"help hep"
Thanks,
Mimi (5 Replies)
Discussion started by: mimilaw
5 Replies
4. Shell Programming and Scripting
I have a file:
575G /local/mis/SYBDUMP
I want to remove the G, K, M or T so I can use $1 in awk or sed to do math.
I want to end up with a file containing:
575 /local/mis/SYBDUMP
It should not matter how small or large the numeric numbers are so if 2, 3, 4, or 5 digits etc I want to see... (9 Replies)
Discussion started by: tamvgi
9 Replies
5. 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
6. 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
7. Shell Programming and Scripting
Hi guys,
I need to remove the pattern (ID=180), one line before and four lines after.
Thanks. (5 Replies)
Discussion started by: ashimada
5 Replies
8. Shell Programming and Scripting
Hi all,
I have a logfile which has lines as following:
DOMAIN\username,Deposit,DOMAIN\ServiceAccountName,25/03/2010,00:10,\\SERVER,,,,/Ts=4BAA9BD6,,,10.00,10.03
It's a log of a pcounter print charge system.
I need to only have the first part (domain\username) and the second last... (4 Replies)
Discussion started by: necron
4 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