How to incorporate mutiple commands in Autosys commandline on UNIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to incorporate mutiple commands in Autosys commandline on UNIX
# 1  
Old 06-12-2009
How to incorporate mutiple commands in Autosys commandline on UNIX

Hi,

I am having a problem running multiple commands in a autosys command line. For example I would like to run a perl script first and then add sleep command after that in the same autosys job like below


insert_job: xxxxxxxxx
command: `perlscript.pl ; sleep 180`

Perlscript.pl is a perl script. To make this question as simple as possible, the perl script just prints a simple line "Hello World" as shown below


#!/usr/bin/perl
printf ("Hello WORLD\n");
exit(0);


When I run the above autosys job, it appears to work and sleeps for 180 seconds / 3 minutes. But after 3 minutes it fails with the error in the error log reading "/bin/sh: line 0: exec: Hello: not found"
Why does this happen. Is there any other way of having mutiple commands in a Autosys commanline ?



Your help is greatly appreciated.

thanks
waavman
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed commands success / fail from commandline vs ksh script

solaris 5.10 Generic_138888-03 sun4v sparc SUNW,Sun-Fire-T200 I need a sed command that tests true when presented with lines that contain either forward and backslash. input file: c:/myFile.txt c:\yourFile.txt It doesn't appear that sed (in my environment anyway) supports... (4 Replies)
Discussion started by: msutfin
4 Replies

2. Shell Programming and Scripting

Shell script with mutiple steps/commands, on UNIX servers

Hi, I wrote a simple script, which will call other scripts or run commands on a UNIX server. my script has multiple steps/commands with some delay in between. I usually get some email notifications after the successful execution of each step. **My intention is to get email alerts when it is... (5 Replies)
Discussion started by: System Admin 77
5 Replies

3. UNIX for Dummies Questions & Answers

awk script combining mutiple commands

Hi, I am pretty new to the unix community and have encountered a problem that I am trying to solve. I have 2 files one of which is called passwd file that looks like the following Sample Output daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh ... (1 Reply)
Discussion started by: raven905
1 Replies

4. Shell Programming and Scripting

Autosys in Unix OS

Hi, I have the UNIX OS and i want to use autosys job. What is basic requirement i mean infra needed to create autosys job. Thanks!!!!!! (0 Replies)
Discussion started by: diehard
0 Replies

5. UNIX for Advanced & Expert Users

quick remote health check SAP systems from UNIX commandline

Hi folks Howto do quick remote health check for SAP systems on UNIX commandline? To see if a SAP system is down or in maintenace mode (no login). I am searching something like "tnsping"/Oracle for SAP systems. (2 Replies)
Discussion started by: slashdotweenie
2 Replies

6. Shell Programming and Scripting

using mutiple "nohup" to execute multiple commands.

I need to run multiple commands on remote server using the nohup... I have tried 2 options 1) rsh <SERVER_NAME> -n "nohup perl $SCRIPTS_DIR/abc.pl ; $SCRIPTS_DIR/xyz.ksh & " & 2) rsh <SERVER_NAME> -n "nohup perl $SCRIPTS_DIR/abc.pl & nohup $SCRIPTS_DIR/xyz.ksh & " & I need to know if... (2 Replies)
Discussion started by: aster007
2 Replies

7. UNIX for Advanced & Expert Users

Documentation and books on Autosys Job Control Tool from Autosys

My project uses Autosys. I am new to this product and I don't know where to start from. Q1. Please provide me the link where I can get Autosys documentation Q2. Please refer a good book on Autosys. (Beginner/Intermediate Level) (0 Replies)
Discussion started by: gram77
0 Replies
Login or Register to Ask a Question
SETUID(1)						      General Commands Manual							 SETUID(1)

NAME
setuid - run a command with a different uid. SYNOPSIS
setuid username|uid command [ args ] DESCRIPTION
Setuid changes user id, then executes the specified command. Unlike some versions of su(1), this program doesn't ever ask for a password when executed with effective uid=root. This program doesn't change the environment; it only changes the uid and then uses execvp() to find the command in the path, and execute it. (If the command is a script, execvp() passes the command name to /bin/sh for processing.) For example, setuid some_user $SHELL can be used to start a shell running as another user. Setuid is useful inside scripts that are being run by a setuid-root user -- such as a script invoked with super, so that the script can execute some commands using the uid of the original user, instead of root. This allows unsafe commands (such as editors and pagers) to be used in a non-root mode inside a super script. For example, an operator with permission to modify a certain protected_file could use a super command that simply does: cp protected_file temp_file setuid $ORIG_USER ${EDITOR:-/bin/vi} temp_file cp temp_file protected_file (Note: don't use this example directly. If the temp_file can somehow be replaced by another user, as might be the case if it's kept in a temporary directory, there will be a race condition in the time between editing the temporary file and copying it back to the protected file.) AUTHOR
Will Deich local SETUID(1)