10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
How would you grep for a line containing only 5 numbers? Something like this.
10 2 12 1 13 (4 Replies)
Discussion started by: cokedude
4 Replies
2. UNIX for Dummies Questions & Answers
I am trying to extract specific information from a large *.sam file (it's originally 28Gb).
I want to extract all lines that are on chr3 somewhere in the range of 112,937,439-113,437,438.
Here is a sample line from my file so you can get a feel for what each line looks like:
seq.4 0 ... (8 Replies)
Discussion started by: genGirl23
8 Replies
3. Shell Programming and Scripting
Dear Friends,
I want to know how to grep for the lines that has a number between given range(start and end).
I have tried the following sed command.
sed -n -e '/20030101011442/,/20030101035519/p'
However this requires both start and end to be part of the content being grepped. However... (4 Replies)
Discussion started by: tamil.pamaran
4 Replies
4. UNIX for Dummies Questions & Answers
I know if i use grep -n that the output will have the lines numbered but is there a way to grep the actually line number.
so like this
grep -n "one" /usr/dict/numbers
1:one
21:twenty-one
31:thirty-one
41:forty-one
51:fifty-one
61:sixty-one
71:seventy-one
81:eighty-one
91:ninety-one
... (1 Reply)
Discussion started by: alindner
1 Replies
5. UNIX Desktop Questions & Answers
Hi all,
I am new to unix and struggling to do the below
I have few lines in a xml
<title>abc:1</title>
<description>abc:2</description>
<language>abc:3</language>
Is it possible to extract only the entire word like abc:1 abc:2 abc:3 instead of the entire line into a new file . Kindly... (3 Replies)
Discussion started by: umapearl
3 Replies
6. UNIX for Dummies Questions & Answers
Hi im new to unix and need to find a way to grep the top 5 numbers in a file and put them into another file. For example my file looks like this
abcdef 50000
abcdef 45000
abcdef 40000
abcdef 35000
abcdef 30000
abcdef 25000
abcdef 20000
abcdef 15000
abcdef 10000
and so on...
How can... (1 Reply)
Discussion started by: ProgChick2oo9
1 Replies
7. Shell Programming and Scripting
Hi,
I would like to get only number in the following strings.
var1="Type20"
var2="type 3"
var3="value 2"
var4="Type 1 Datacenter Hall 2"
I would like to extract output as 20 from var1 and 3 from var2,2 from var3 and 1 from var4.
Appreciate any one help asap..
Regards,
Aji (5 Replies)
Discussion started by: ajilesh
5 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I'm trying to grep for digits surrounded by non digits and I'm obviously misinformed. Could someone help me get this sorted out
here is what I have that is not working
grep -ho '\D(\{11\})\D' *.txt (5 Replies)
Discussion started by: mcgrailm
5 Replies
9. Shell Programming and Scripting
Hi,
I want to find out whether a string contains non numbers and + and -
example :
Str="0005000A" - It contains A
Str="0005000+" - No problem
What I have done is ,
echo $Str | grep
I will have to list out all non numeric characters... (6 Replies)
Discussion started by: shihabvk
6 Replies
10. Shell Programming and Scripting
I want to grep a range of numbers in a log file. My log file looks like this:
20050807070609Z;blah blah
That is a combination of yr,month,date,hours,minutes,seconds.
I want to search in the log file events that happened between a particular time.
like between 20050807070000 to 20050822070000... (1 Reply)
Discussion started by: azmathshaikh
1 Replies