The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
crontab entry to run every last day of the month tads98 Shell Programming and Scripting 9 01-09-2009 12:52 PM
Crontab Entry Dastard Shell Programming and Scripting 5 02-10-2007 02:22 AM
crontab entry Sowser UNIX for Advanced & Expert Users 4 01-08-2007 05:34 PM
Crontab entry bestbuyernc Shell Programming and Scripting 1 09-12-2005 04:13 PM
crontab entry matrixmadhan UNIX for Dummies Questions & Answers 3 06-07-2005 09:57 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-26-2006
hcclnoodles hcclnoodles is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 272
amending crontab entry

Ok , im not sure if this can be done but I am writing a script that will install a package . I need it to remove the crontab entry for the old version and replace it with the crontab entry for the new version (which is slightly different) the old entry is
Code:
0 22 * * 0 /opt/SUNWexplo/explorer -mail
and the new entry is

Code:
0 22 * * 0 /opt/SUNWexplo/bin/explorer -q -e # SUNWexplo
Does anybody know how I can script the removal of one line and the addition of the other (ideally in one line) ??

any help would be greatly appreciated
  #2 (permalink)  
Old 10-26-2006
srikanthus2002's Avatar
srikanthus2002 srikanthus2002 is offline
Registered User
  
 

Join Date: Sep 2006
Location: Can u guess...!
Posts: 160
you can use the following command

Code:
sed 's/explorer -mail/bin\/\explorer -q -e # SUNWexplo/'
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:43 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0