LinuxQuestions.org
Help answer threads with 0 replies.
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 04-27-2010, 08:58 PM   #16
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,254

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686

Sed still works well too:
Code:
sed -rn '/ .{3,}/p' file
Of course if we are looking at the original post:
[QUOTE]Delete lines from a file by their's length/[QUOTE]
It might look like:
Code:
sed -ri '/ .{,2}$/d' file

Last edited by grail; 04-27-2010 at 09:01 PM.
 
  


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
Delete Duplicate Lines in a file, leaving only the unique lines left xmrkite Linux - Software 6 01-14-2010 07:18 PM
sed delete lines from file one if regexp are listed in file two fucinheira Programming 6 09-17-2009 09:28 AM
how to delete two adjecent lines in a text file wangxinmco Linux - Newbie 3 01-10-2008 03:23 PM
Delete first and last lines of a file ChainsawPenguin Programming 5 09-28-2007 08:28 AM
delete some lines from a file freelinuxcpp Linux - Software 4 01-17-2004 11:28 AM


All times are GMT -5. The time now is 10:43 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration