LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 05:11 AM   #1
s_shenbaga
LQ Newbie
 
Registered: Apr 2005
Location: India
Distribution: Red Hat 8
Posts: 5

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

Rep: Reputation: 30
Code:
man grep
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:13 AM.

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
Open Source Consulting | Domain Registration