http://qs321.pair.com?node_id=104052


in reply to Re: Re: Re: Re: Re: Aging Script
in thread Aging Script

I was aware that I was looking at the -d option twice. Though when I ran the script that you had orginally gave me, I got an error stating: that -h option was only used once. I think thats why I changed it..and now I am confused.
I want to use the -d option..but don't know how to go around the error I am getting. No, I dont' have Getopt::Std module installed. I am very new to cron..so if you don't mind explaining that bit...that would be great. Thanx!
~Seema

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: Aging Script
by OzzyOsbourne (Chaplain) on Aug 14, 2001 at 15:41 UTC

    Option 1:In order to use the otions in the script, you have to have getopt::Std installed (use Getopt::Std) as mentioned at the top of the script. Read here for more info. This should solve your issue.

    Option 2:Wipe out all of the options, and setting $agedays=$ARGV[0] which would be the same as running agecmd.pl days. This requires no additional modules, but you'd have to rewrite the error checking so that the argument is a number and not "xfl" or something equally incorrect. Here is a thread referencing this option.

    Option 3: Or you can wipe out the whole options section at the top and just simply set $agedays to whatever number of days you require.

    -OzzyOsbourne