Re: Shell scripting woes.

2004-02-26 Thread Jan Grant
On Wed, 25 Feb 2004, Mathias Haas wrote: Oh my! What stupidity! Of course. I'm afraid sometimes my DOS-roots are revealed... Thanks! In general, you ought to be aware that cron sets up only a minimal environment. If you want your scripts to run predictably then you probably ought to ensure

Re: Shell scripting woes

2004-02-25 Thread mathias
On Tue, 24 Feb 2004 17:56:49 +0100 (CET) [EMAIL PROTECTED] wrote: Hello guys! I have two questions about shellscripts: Your second question seems to have been addressed, so here's something for your first question... 1) I have a backup job that 'tar's a lot of files and currently I

Shell scripting woes

2004-02-24 Thread mathias
Hello guys! I have two questions about shellscripts: 1) I have a backup job that 'tar's a lot of files and currently I redirect all output of the job to a log. Tar unfortunately lists all directories that it goes through, even if nothing is 'tar'ed in those directories. So my logfile contains all

Re: Shell scripting woes

2004-02-24 Thread Peter Risdon
[EMAIL PROTECTED] wrote: Hello guys! I have two questions about shellscripts: 2) The same backup job - is written as a bash script, and it works perfectly when run by hand, but it won't run as a cron job. Are you using a full path in the shebang at the top of the script? Such as: #!/bin/sh

Re: Shell scripting woes.

2004-02-24 Thread Mathias Haas
Julien Gabel wrote: Hello guys! I have two questions about shellscripts: 2) The same backup job - is written as a bash script, and it works perfectly when run by hand, but it won't run as a cron job. Are you using a full path in the shebang at the top of the script? Such as: #!/bin/sh or

Re: Shell scripting woes.

2004-02-24 Thread Julien Gabel
Hello guys! I have two questions about shellscripts: 2) The same backup job - is written as a bash script, and it works perfectly when run by hand, but it won't run as a cron job. Are you using a full path in the shebang at the top of the script? Such as: #!/bin/sh or

Re: Shell scripting woes.

2004-02-24 Thread Lowell Gilbert
Mathias Haas [EMAIL PROTECTED] writes: As a reply to both answers, here's a script that wont' run: #!/usr/local/bin/bash echo start test.txt Is it executable? Does the last line have a newline at the end? ___ [EMAIL PROTECTED] mailing list

Re: Shell scripting woes.

2004-02-24 Thread Mathias Haas
It is executable and it didn't have a newline at the end, it does now - but there's still no difference... Do you have to do something to get FreeBSDs (4.6.2) cron to run shellscripts? ..and I can still run the script by hand Lowell Gilbert wrote: Mathias Haas [EMAIL PROTECTED] writes: As

Re: Shell scripting woes.

2004-02-24 Thread Andrew Hall
You might wanna check the users mailbox. Cron send mail on errors. Drew On Tue, 2004-02-24 at 16:11, Mathias Haas wrote: It is executable and it didn't have a newline at the end, it does now - but there's still no difference... Do you have to do something to get FreeBSDs (4.6.2) cron to

Re: Shell scripting woes.

2004-02-24 Thread Jason Taylor
Mathias Haas wrote: Julien Gabel wrote: Hello guys! I have two questions about shellscripts: 2) The same backup job - is written as a bash script, and it works perfectly when run by hand, but it won't run as a cron job. Are you using a full path in the shebang at the top of the script? Such

Re: Shell scripting woes.

2004-02-24 Thread Julien Gabel
As a reply to both answers, here's a script that wont' run: #!/usr/local/bin/bash echo start test.txt ...and here is bash: [EMAIL PROTECTED] /usr/local/etc] whereis bash bash: /usr/local/bin/bash this is /var/log/cron Feb 24 19:20:00 p3-550 /usr/sbin/cron[27988]: (root) CMD

Re: Shell scripting woes.

2004-02-24 Thread Mathias Haas
Julien Gabel wrote: As a reply to both answers, here's a script that wont' run: #!/usr/local/bin/bash echo start test.txt ...and here is bash: [EMAIL PROTECTED] /usr/local/etc] whereis bash bash: /usr/local/bin/bash this is /var/log/cron Feb 24 19:20:00 p3-550 /usr/sbin/cron[27988]: (root) CMD

Re: Shell scripting woes

2004-02-24 Thread Chris Pressey
On Tue, 24 Feb 2004 17:56:49 +0100 (CET) [EMAIL PROTECTED] wrote: Hello guys! I have two questions about shellscripts: Your second question seems to have been addressed, so here's something for your first question... 1) I have a backup job that 'tar's a lot of files and currently I redirect