LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-02-2005, 10:27 AM   #1
LULUSNATCH
LQ Newbie
 
Registered: Nov 2005
Location: Belgium
Distribution: Slackware 10.1 - Suse 9.1
Posts: 4

Rep: Reputation: 0
Grab text lines in text file


Hi,
How can i grab text lines NOT beginning by # in a text file with the sed command

Thanks
 
Old 12-02-2005, 10:55 AM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
sed -n '/^#/!p' text-file
 
  


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
Which light text editor can copy text from file and paste in browser? davidas Linux - Software 9 03-06-2006 11:28 AM
adding text to lines in a file tpreitano Linux - General 2 10-04-2005 09:30 AM
Remove odd lines from a text file Mr. Gone Programming 2 09-19-2005 11:16 AM
How to filter lines from a text file Rascale Linux - Software 1 10-28-2003 12:46 PM
Loop over lines in text file? amaze Linux - General 2 08-12-2003 07:15 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:54 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