10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have been searching all over Google but I am unable to find a solution for a particular result that I am trying to achieve.
Consider the following input:
1
2
3
4
5
B4Srt1--Variable-0000
B4Srt2--Variable-1111
Srt
6
7
8
9
10
End (3 Replies)
Discussion started by: y2jacky
3 Replies
2. Shell Programming and Scripting
cat test.txt
a
c
d
e
g (2 Replies)
Discussion started by: TomG
2 Replies
3. Shell Programming and Scripting
I need to grep for the pattern text inside the square brackets which are in red and not in green..my current code greps patterns both of them, which i don't want
Input fileref|XP_002371341.1| oxoacyl-ACP reductase, putative gb|EPT24759.1| 3-ketoacyl-(acyl-carrier-protein) reductase ... (2 Replies)
Discussion started by: selvankj
2 Replies
4. Shell Programming and Scripting
S 0.0 0.0 (reg, inst050)
k
e
f
d
c
S 0.0 0.0 (mux, m030)
k
g
r
s
x
v
S 0.0 0.0 (reg, inst020)
q
s
n
m (12 Replies)
Discussion started by: ctphua
12 Replies
5. Shell Programming and Scripting
Ive used this snippet of code on a solaris box thousands of times.
But it isnt working on the new linux box
sed -n '/interface LoopBack0/{N;/ ip address /p;}' *.conf
its driving me nuts !!
Is there something Im missing ? (7 Replies)
Discussion started by: popeye
7 Replies
6. Shell Programming and Scripting
awk , sed Experts,
I want to remove first and last line after pattern match "vg" :
I am trying : # sed '1d;$d' works fine , but where the last line is not having vg entry it is deleting one line of data.
- So it should check for the pattern vg if present , then it should delete the line ,... (5 Replies)
Discussion started by: rveri
5 Replies
7. Shell Programming and Scripting
if the column1 and 2 in both files has same key (for example "a" and "a1") compare each first key value(a1 of a) of input2 (for example 1-4 or 65-69 not 70-100 or 44-40 etc) with all the values in input1.
if the range of first key value in input2 is outof range in input1 values named it as out... (54 Replies)
Discussion started by: repinementer
54 Replies
8. Shell Programming and Scripting
Hi guys, trying to replace a '#' with a ' ' (space) but only between the brackets '(' and ')'
N="text1#text2#text3(var1#var2#var3)"
N=`echo $N |sed '/(/,/) s/#. //'`
echo $N
Looking for an output of "text1#text2#text3(var1 var2 var3)"
Any ideas? (15 Replies)
Discussion started by: mikepegg
15 Replies
9. Shell Programming and Scripting
the following range matching works great but i wish to add a blank line after each range result set... which i've tried and researched to no avail
MY INPUT DATA:
CURRENT CODE I'M USING:
sed -n '/*$/,/;/p' $INPUT_FILE
RESULTS I'M GETTING:
RESULT I looking to... (5 Replies)
Discussion started by: danmauer
5 Replies
10. Shell Programming and Scripting
Hi all,
I am using sed for extracting the lines that occurs between the 2 patterns using the following command:
sed -n '/pattern1/,/pattern2/' filename
The above command has no problem and works fine. But I was wondering if there is a way to quit sed when it has extracted the range at... (3 Replies)
Discussion started by: sank
3 Replies