10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I'm trying to remove the duplicate consecutive lines with specific string "WARNING".
File.txt
abc;
WARNING 2345
WARNING 2345
WARNING 2345
WARNING 2345
WARNING 2345
bcd;
abc;
123
123
123
WARNING 1234
WARNING 2345
WARNING 2345
efgh; (6 Replies)
Discussion started by: Mannu2525
6 Replies
2. Linux
I have a file that looks like this:
DIP-27772N DIP-18408N refseq:NP_523941
DIP-23436N|refseq:NP_536784 DIP-23130N|refseq:NP_652017
DIP-22958N|refseq:NP_651195 DIP-20072N|refseq:NP_724597
DIP-22928N|refseq:NP_569972 DIP-22042N|refseq:NP_536744|uniprotkb:P54622... (4 Replies)
Discussion started by: Syeda Sumayya
4 Replies
3. Shell Programming and Scripting
Hello Guys,
I need to replace a string with multiple lines.
For eg:-
ABC,DEF,GHI,JKL,MNO,PQR,STU
need to convert the above as below:-
ABC,DEF,
GHI1
GHI2
GHI3,
JKL,MNO,
PQR1
PQR2
PQR3,
STU
i have tried using code as:- (2 Replies)
Discussion started by: jassi10781
2 Replies
4. UNIX for Dummies Questions & Answers
Gurus,
I am relatively new to Unix scripting and am struck with a problem in my script. I have positional input file which has a FLAG indicator in at position 11 in every record of the file.
If the Flag has value =Y, then the record from the input needs to be written to a new file.However if... (3 Replies)
Discussion started by: gsam
3 Replies
5. UNIX for Dummies Questions & Answers
i have file input
aa,20120626 bb,45Cexpect to remove all lines when $2 doesn't end with 'C"
output
bb,45Ci tried this
sed -i -nl -e '/\<C\>/ {p;} ' file1
but the result : sed illegal option -i (5 Replies)
Discussion started by: radius
5 Replies
6. Shell Programming and Scripting
Hi,
I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Discussion started by: Dabheeruz
1 Replies
7. Shell Programming and Scripting
I have this:
301205 0000030000041.49000000.00 2011111815505 908
301205 0000020000029.10000000.00 2011111815505 962
301205 0000010000027.56000000.00 2011111815505 3083
312291 ... (2 Replies)
Discussion started by: herot
2 Replies
8. Shell Programming and Scripting
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Discussion started by: spfc_dmt
12 Replies
9. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies
10. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
5 Replies