LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
extracting line number


hi,

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, 06:52 AM   #2
deoren
Member
 
Registered: Oct 2003
Location: USA
Distribution: Ubuntu
Posts: 216

Rep: Reputation: 30
Code:
man grep
 
  


Reply


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 05:19 PM
Extracting the line number in Unix Shell? Aziz Programming 2 12-01-2004 12:03 PM
extracting ms powerpoint template files (.pot) from the command line? fibbi Linux - Software 0 11-07-2004 05:27 PM
extracting line by line from a file sanjith11 Programming 3 07-02-2004 08:38 PM
Stray at line number vipinsharma Programming 1 05-21-2004 10:27 AM


All times are GMT -5. The time now is 02:18 PM.

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