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 11-08-2006, 09:31 AM   #16
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233

It's just up to you if you're up for speed. I find the first one a lot more common and readable though. You can't also use that normal syntax if you're going the use commands other than cat like sed or grep.
 
Old 11-08-2006, 09:33 AM   #17
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Shortest one so far I think...
Code:
grep '^...[3-9]' file.txt
 
  


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
Printing random lines of a file jrdioko Linux - Software 3 07-20-2006 09:00 AM
Inserting lines into a file through shell scripting false-hopes Linux - General 1 10-22-2005 11:39 AM
[bash] removing or editing lines in file Erhnam Programming 12 03-15-2005 07:25 AM
Can't get lines of a file with a Bash script.. barisdemiray Programming 2 08-11-2004 12:42 PM
[bash] remove lines from a file Drimo Programming 3 03-20-2004 11:16 AM


All times are GMT -5. The time now is 08:57 PM.

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