Sponsored Content
Top Forums Shell Programming and Scripting New to forums and had a quick one. Post 302249069 by okiedokie on Monday 20th of October 2008 01:01:10 PM
Old 10-20-2008
New to forums and had a quick one.

I am trying to use grep or awk to search for a specific number in a file. For eg.

grep -i "Tag: 140" filename.

The above command also lists other Tag: 140 like below.

Tag: 1409970
Tag: 1409969
Tag: 1409749
Tag: 1409968
Tag: 1409750
Tag: 140
Tag: 1409751
Tag: 1409752
Tag: 1409746
Tag: 1409966

I need only a specific number and not all numbers starting in 140.

Thanks so much.
 

3 More Discussions You Might Find Interesting

1. What is on Your Mind?

other forums..

anyone here a member of any other NON computer related forums? i am very much into cars, and i own a 1986.5 toyota supra :D , so i am a member of a few mkiii (third generation supra) related forums: supraforums.com supramania.com mkiiitech.com (2 Replies)
Discussion started by: norsk hedensk
2 Replies

2. Solaris

Forums...

Hi all, Thanks for any posts and for reading. I was wondering if any of guys know of a open source style forum that I could get hold of that would be easily run on solaris. I know you can use many different varities of PHP/mysql/apache but is there anything a bit more simplier that could be... (0 Replies)
Discussion started by: B14speedfreak
0 Replies

3. Forum Support Area for Unregistered Users & Account Problems

I am not able to register in the forums

Hi, I am from India. I am not able to register in this forum. Can you kindly help me to register and post. Thanks Gautam (1 Reply)
Discussion started by: Unregistered
1 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 04:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy