The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find and delete the line gsusarla UNIX for Advanced & Expert Users 8 07-09-2008 01:15 PM
sed: find match and delete the line above cstovall Shell Programming and Scripting 3 07-02-2008 07:31 PM
Delete a word and complete line Aejaz UNIX for Advanced & Expert Users 1 05-02-2008 09:50 AM
find a word in a file, and change a word beneath it ?? vikas027 Shell Programming and Scripting 2 02-13-2008 12:23 PM
Can a shell script pull the first word (or nth word) off each line of a text file? tricky Shell Programming and Scripting 5 08-17-2006 03:29 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-02-2008
Registered User
 

Join Date: Apr 2008
Posts: 10
Find a word and delete the line

Hi I have a text file like this name today.txt

the request has been accepted
the scan is successful at following time
there are no invalid packages
5169378 : map : Permission Denied
the request has been accepted

Now what i want do is

I want to search the today.txt file and

if i find "permission denied" then I have to delete the whole line.
so that the text looks like this,

the request has been accepted
the scan is successful at following time
there are no invalid packages
the request has been accepted


Any help is appreciated,

gns.
Forum Sponsor
  #2 (permalink)  
Old 04-02-2008
Moderator
 

Join Date: Feb 2007
Posts: 1,988
It's against the:

Simple rules of the UNIX.COM forums:

to double posts questions, continu here:

Find and delete the line
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0