Re: [newbie] BASHing My Crontab

1999-10-12 Thread yacketta



From: Ronald A. Yacketta

have you but a
#! /bin/bash (or is it !# dang I forget) at the very top of the script?
also try gicing the full path to the command IE:
/usr/sbin/ifconfig
/bin/grep

(above paths could be wrong, just giving examples)




Re: [newbie] BASHing My Crontab

1999-10-12 Thread Simon Norris

Something along the lines of;

!/bin/bash -u

At the beginning of the script? The idea is to change the shell of the
script currently running to be bash, and when the script terminates, control
returns to sh.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 12, 1999 1:26 PM
Subject: [newbie] BASHing My Crontab




Hey Scripting Gurus,

 I set up a crontab for root to run a script.  The script was written
for
bash.  I found out that cron runs under sh?  When the job kicks off, it
can't
find ifconfig or grep, which are part of the script.  Email is sent to root
"ifconfig : command not found"  "grep : command not found".  Is it possible
to
make ifconfig and grep "available" to sh?  Is it possible to force cron to
run
under bash?
Does what I am asking make any sense?
After finally hashing out the script, I never thought I would hit a brick
wall
with cron :-(



Thanks,
Bryan






Re: [newbie] BASHing My Crontab

1999-10-12 Thread BryanMoorehead



Thanks to all.
Especially:
yacketta
bero
Simon Norris

I wound up both setting the path at the beginning, and putting FQFNs any place a
command or file was referenced.
Sort of double redundant but...

It ain't gota be pretty.  It's just gotta work!

Thanks,
BRyan




[EMAIL PROTECTED] on 10/12/99 09:22:43 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Bryan Moorehead/Link/Allied Holdings)
Subject:  Re: [newbie] BASHing My Crontab






From: Ronald A. Yacketta

have you but a
#! /bin/bash (or is it !# dang I forget) at the very top of the script?
also try gicing the full path to the command IE:
/usr/sbin/ifconfig
/bin/grep

(above paths could be wrong, just giving examples)