10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello gurus,
I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired
report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup
is shown below:
#!/bin/ksh
db2... (3 Replies)
Discussion started by: okonita
3 Replies
2. Shell Programming and Scripting
Hi, I've got a Bash backup script I'm trying to run on a directory via a cron job nightly. If I ssh in and run the script manually it works flawlessly. If I set up the cron to run evertything is totally messed up I don't even know where to begin.
Basically the path structure is
... (6 Replies)
Discussion started by: wyclef
6 Replies
3. Shell Programming and Scripting
I'm having a problem scripting Expect to work as a Nagios check. The script runs fine from the cli, but not when run as a Nagios check. I turn on the debug output, and it looks like it's not seeing the whole buffer's worth of info, like it's paged interactively somehow. I'm new to Expect, but this... (1 Reply)
Discussion started by: dhargens
1 Replies
4. Shell Programming and Scripting
Having issues with an expect script. I've been scripting bash, python, etc... for a couple years now, but just started to try and use Expect. Trying to create a script that takes in some arguments, and then for now, just runs a pwd command(for testing, final will be command I pass).
Here is... (0 Replies)
Discussion started by: cbo0485
0 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I am calling a series of shell scripts via CRON so everything is running as root. However, in my error log file I am seeing the following errors. Please can anyone offer any advise as to the possible causes and solution to prevent the errors from appearing.
The Error 1227 seems to... (2 Replies)
Discussion started by: daveu7
2 Replies
6. Shell Programming and Scripting
Hi,
I am building a web interface to run a series of shell scripts that reside on the web server. The bash script are written such that they can be used independently for the task they are meant for, or the same scripts can be run from this web UI. The scripts are mostly for doing software... (1 Reply)
Discussion started by: MacQAGuy
1 Replies
7. Shell Programming and Scripting
Hello,
I have the following script which works fine when ran from the command line:
#!/apps/python/2.3.4/bin/python
import os
import sys
import time
user = os.getenv("USER")
string = time.strftime("%m%d%y0000 " + user, time.gmtime())
However, when I have this run by crontab, I... (4 Replies)
Discussion started by: cooldude
4 Replies
8. Shell Programming and Scripting
Hi,
Is there a way to determine if a Script is called from a
CRON job or from a commandline
Gerry. (2 Replies)
Discussion started by: jerryMcguire
2 Replies
9. Shell Programming and Scripting
Hello expert,
What I want is to determine whether the script is called from CRON or it is executed interactively?
I tried the following but no luck:
#!/bin/ksh
cronID=`pgrep -x cron`
GPID=`ps -ef -o ppid,pid | grep " $PPID$" | awk '{print $1}'`
if ; then
echo I am being run... (15 Replies)
Discussion started by: wes_brooks
15 Replies
10. Shell Programming and Scripting
I'm puzzled by this one. I hope you can explain it to me.
I have a ksh shell script that gzips a file among other things. This works perfectly fine when the script is manually run through a shell. However, when the same script is run through cron, it does everything correctly, but it will... (2 Replies)
Discussion started by: hbau419
2 Replies