![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Execution on cron does not work well | msetjadi | Shell Programming and Scripting | 7 | 06-03-2009 09:38 PM |
| Cron execution of shell script | ashish.sharma | Shell Programming and Scripting | 3 | 09-08-2008 03:57 AM |
| cron execution | rameek20 | SUN Solaris | 6 | 10-22-2007 06:30 AM |
| Sequential execution of job in cron | pankajkrmishra | Shell Programming and Scripting | 3 | 08-15-2006 06:19 AM |
| Cron Skips Execution | nag_sundaram | HP-UX | 6 | 10-25-2005 03:46 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I have the following script (MyScript):
#!/bin/sh ps U erv | grep -v grep | grep -F "/usr/bin/collect -o 101" echo "Result: $?" When executed from the command line, I get ... (the line containing /usr/bin/collect -o 101) Result: 0 (which is correct since collect is running) When I put the script in cron with: */10 * * * * ./MyScript >>log.log in log.log I get Result: 1 What is wrong? I tried to put the complete path for ps and grep, but I had the same result. Could be because the command displayed by ps is truncated? How can I display it all? Please help! |
| Bookmarks |
| Tags |
| shell script cron |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|