Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-21-2005, 05:11 AM   #1
LQ Newbie
Registered: Apr 2005
Location: India
Distribution: Red Hat 8
Posts: 5

Rep: Reputation: 0
extracting line number


i have a string in a variable. with that string i have to grep the line containg that string in other file and i have to find the line number of that particular line.

i have found that particular line but have no idea to get the line number.

plz help me.
Old 10-21-2005, 05:52 AM   #2
Registered: Oct 2003
Location: USA
Distribution: Ubuntu
Posts: 216

Rep: Reputation: 30
man grep


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting a specific line from an ASCII file heyyou Programming 7 03-21-2005 04:19 PM
Extracting the line number in Unix Shell? Aziz Programming 2 12-01-2004 11:03 AM
extracting ms powerpoint template files (.pot) from the command line? fibbi Linux - Software 0 11-07-2004 04:27 PM
extracting line by line from a file sanjith11 Programming 3 07-02-2004 07:38 PM
Stray at line number vipinsharma Programming 1 05-21-2004 09:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:01 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration