Fedora Linux Support Community & Resources Center
Prev Previous Post   Next Post Next
  #1  
Old 9th April 2012, 12:49 PM
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Age: 57
Posts: 14,813
linuxfirefox
Remove lines of text using a script

I wonder if anyone can help me and at the same time teach me ... how to remove lines containing selected text from a text file using bash scripting. For example, if a text file contains the following lines, at random locations within the file and not necessarily one following the other:

PHP Code:
glenn the_linuxfan
mike the_linuxfan
john the_linuxfan 
How the h-e double hockey sticks is this accomplished? I've examined sed and awk, loops, arrays, etc. but I just-can't-get-it-right !!!!

Your kind suggestions will be immensely appreciated.
__________________
Glenn
The Bassinator © ®

[SIGPIC][/SIGPIC]
Laptop: Just a couple of old single core units
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / Kingston HyperX 3K SSD 240GB SATA 3.0 / 1TB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
 

Tags
lines, remove, script, text

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Question] How to remove all lines that contain certain text in VI beyonddc Using Fedora 2 22nd August 2007 05:58 PM
Need a script to remove lines beginning with a certain word Jongi Programming & Packaging 2 8th July 2007 06:07 PM
Script to Remove few lines from a file fed.linuxgossip Using Fedora 3 5th March 2007 10:46 PM
Awk for specific lines in text keysorsoze Using Fedora 1 17th January 2007 09:14 PM


Current GMT-time: 19:34 (Thursday, 27-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Agra ( City Of Taj ) - Osaka