10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI Guys,
I want grep Below line from a huge file.
01 01 -094.6 -093.3 -095.8 -094.0 01.3/01.3 18.1/18.7
I want to grep line which have data between -60 to -200
Thanks (4 Replies)
Discussion started by: pareshkp
4 Replies
2. Shell Programming and Scripting
Hi. im trying to retrieve the line number from grep. i have 1 part of my code here.
grep -n $tgt file.txt | cut -f 1 -d ":"
when i do not cut the value i have is 12:aaa:abc:aaa:aaa:aaa
how can i store the value of 12 or my whole line of string into a variable with grep? (6 Replies)
Discussion started by: One_2_three
6 Replies
3. Shell Programming and Scripting
Hi
I have the following file
ENST001 ENST002 4 4 4 88 9 9
ENST004 3 3 3 99 8 8
ENST009 ENST010 ENST006 8 8 8 77 8 8
Basically I want to count how many times ENST* is repeated in each line so the expected results is
2
1
3
Any suggestion please ? (4 Replies)
Discussion started by: fuad_
4 Replies
4. Shell Programming and Scripting
Hi
I have requirement to find nth occurrence in a file and capture data from with in lines (between lines)
Data in File.
<QUOTE>
<SESSION>
<ATTRIBUTE NAME='Parameter Filename' VALUE='file1.parm'/>
<ATTRIBUTE NAME='Service Name' VALUE='None'/>
</SESSION>
<SESSION>
<ATTRIBUTE... (6 Replies)
Discussion started by: tmalik79
6 Replies
5. UNIX for Dummies Questions & Answers
I`m having a output shown below,
CFR 235,BBC DM-2 ALL
CFR 111,BBC DM-2 ALL
CFR 333,BBC DM-2 ALL
from the above Output i want to use 235,111,333 as input for other purpose.
these no always change every time i run script.so please suggest me the way i could do it with example,i have tried... (5 Replies)
Discussion started by: nitin_aaa27
5 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
is there a simple way to obtain the line number of the i-th occurrence of a pattern?
I have
OCCURRENCE=`grep -io "${STRING_NAME}" ${1}-${8}${EXT}.out_bis| wc -l`
which tells me how many occurency I have. I would like to go through them and determine the line number and assign... (6 Replies)
Discussion started by: f_o_555
6 Replies
7. Shell Programming and Scripting
I'm trying to use grep to get the line number only. This is the command I'm using:
grep -n "Content-Disposition: attachment" mbox
The output I get is:
45:Content-Disposition: attachment; filename="test.txt"
So now I just want to get the line number (45) from this output.
Can someone... (8 Replies)
Discussion started by: mskarica
8 Replies
8. Shell Programming and Scripting
In file.name, I have a line that reads
$IDIR/imgen -usemonths -dropcheck -monitor -sizelimit 80000000 -interval 120 -volcal HSI
How can I get the size limit, i.e. 80000000 out and pass it to a variable called SIZE?
Thanks. I tried
echo "grep sizelimit file.name" | sed -n -e... (3 Replies)
Discussion started by: rodluo
3 Replies
9. Shell Programming and Scripting
Dear Masters,
Here i have some doubts can anyone clarify?.
Is it possible to grep the lines by specifying the line numbers.
I know the line number which i want to grep.
example:
grep 40th line filename
grep 50th line filename
Need ur comments. (4 Replies)
Discussion started by: salaathi
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am using the Korne shell to try and get the filename, line number and the line of text using grep e.g.
find ./ -type f -name "*.java" -exec grep -nf test.txt '{}' \;
(test.txt contains strings to search)
will return the line number and the line of text.
grep -l would return the... (4 Replies)
Discussion started by: ceemh3
4 Replies