LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-02-2001, 09:40 PM   #1
Mike_the_Man
Member
 
Registered: Jan 2001
Location: work
Distribution: Redhat, Mandrake
Posts: 33

Rep: Reputation: 15
Question


Hello,

I was wondering if anyone knew how to display a predetermined line of a file. For example if I have a text file that I want to display line 12. It seems that it should be an easy command. Thanks a head of time for any help.

Mike
 
Old 03-02-2001, 10:12 PM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 10,425

Rep: Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628Reputation: 2628
If you wanted to see line number 12 of a file named LinuxQuestions this would do:
Code:
head -12 LinuxQuestions | tail -1
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash shell script read file line by line. Darren[UoW] Programming 51 07-04-2013 08:16 PM
C++ text file line by line/each line to string/array Dimitris Programming 15 03-11-2008 08:22 AM
Simple bash problem - checking for files and displaying the first line morrolan Programming 4 03-07-2005 10:40 AM
displaying services from command line stellarmarine1 Linux - Enterprise 5 10-01-2004 03:28 AM
linux scripting help needed read from file line by line exc commands each line read atokad Programming 4 12-26-2003 10:24 PM


All times are GMT -5. The time now is 03:09 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration