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
Pro*c compilation error satvd Shell Programming and Scripting 1 05-21-2008 07:47 AM
pro*c compilation error satvd High Level Programming 0 05-21-2008 06:04 AM
compilation error smanu High Level Programming 2 12-29-2006 10:11 AM
Regarding compilation error. sweta High Level Programming 1 12-10-2006 11:30 AM
BEGIN failed--compilation aborted abhijeetkul UNIX for Advanced & Expert Users 1 03-21-2006 03:36 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 11-17-2008
mcraul mcraul is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 80
aborted due to compilation error

I wanted to edit the time for a cron job that cleans out the quarantine in mailscanner.


Code:
etc/cron.daily/clean.quarantine

I edited the file



Code:
#!/usr/bin/perl


#
# IMPORTANT NOTE:
#
# Change the next line to 0 instead of 1 to enable this script.
# By default it will be disabled and will not do anything.
#

#$disabled = 0;



$quarantine_dir = '/var/spool/MailScanner/quarantine';
days_to_keep   = 7;

exit if $disabled;

Changed the days to keep to 7 instead of 30 and then enabled the script.

When I ran the script I got the following error


Code:
 cron.daily]#  ./clean.quarantine
Can't modify constant item in scalar assignment at ./clean.quarantine line 16, near "7;"
Execution of ./clean.quarantine aborted due to compilation errors.

What could of caused the script to bomb like that?
FYI I used vi to edit the file.

Thanks
  #2 (permalink)  
Old 11-17-2008
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 669

Code:
days_to_keep   = 7;

should be

$days_to_keep   = 7;

  #3 (permalink)  
Old 11-17-2008
mcraul mcraul is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 80
DUH
thanks
i figured it was something that simple
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 05:25 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