LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   BASH Scripting - printing select lines in a file (https://www.linuxquestions.org/questions/linux-newbie-8/bash-scripting-printing-select-lines-in-a-file-498645/)

konsolebox 11-08-2006 09:31 AM

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.

matthewg42 11-08-2006 09:33 AM

Shortest one so far I think...
Code:

grep '^...[3-9]' file.txt


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