Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8581

Re: how to call scp shell script in bods job

$
0
0

Hi srujan G,

 

Try to print the path by using the print function. below is the example how to use the exec function.

 

 

Try calling like


exec('/usr/sap/project/script.sh','',8);

 

By using Print function check it's path.

Print(exec('bin/sh',' cd /usr/sap/project/script.sh',8));

 

 

In the above script. i think you are using '.'in between the parameters. It should be ",".

 

Syntax

exec(command_file, parameter_list, flag)

 

capture(1).png

 

Example:

 

The examples below can be used with NT or UNIX.

If you were using the first two examples for UNIX, substitute 'sh', 'csh', 'ksh', 'bash' or 'tcsh' for 'cmd'. Also, the first two examples call 'cmd' rather than the program directly.

 

You need to use 'cmd' (or its equivalent) if either: • The "command" is a built-in of the shell (e.g., 'DIR' is not a program in NT) • Piping (a single '|' in an argument) occurs • In either NT or UNIX, the vertical bar symbol sends the output of one command to another command. Only use a vertical bar inside quotes. In Data Services, thedoubleverticalbar symbol (||) concatenates strings. Only use a double vertical bar outside quotes. Also, remember that the '\', '/' symbols are interchangeable when using NT.

 

However, only '/' is accepted as a directory separator on UNIX.

 

exec('cmd', 'dir ' || $filename, 8); exec('cmd', 'x:/bin/program1.exe | x:/bin/postprocess.bat', 4);

exec(SRC.PROGNAME, ARGTBL.ARGS || ' lastArg', 2);

exec('c:\Data Services\bin\clone_and_rename.bat', TBL.FNAME, 1);

exec('C:\Perl5\bin\perl.exe', 'C:\sandbox\stats.pl 20 50 3000', 0);

                                                       -Source                             

Regards,

Akhilesh Kiran.


Viewing all articles
Browse latest Browse all 8581

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>