Hi All,
I want to pass array of argument from Java to a shell script.I can use process builder api and its exec() method to call the script,but the question is how to receive the parameter in the script.
Thanks in advance
Hi,
I have created a Shell Script and invoke through java using Process Builder
It's working fine, if (Shell script file ) in the same directory as java file.
By Problem:
How to run the Shell Script file( resides in external directory) using java. What configuration i have to do in java.
Please Suggest me,
Thank you and Regards,
Nanthagopal A
Whenever the shell script is invoked by the scheduler the command execution return code is always captured as 0(Success).
If the same shell script is executed in command line via unix terminal, the command execution return code's are captured properly.
For example:
ls -ltr es_wrong_file ----> file not available in the filesystem
echo $? ----> return code $?
I have to run a couple of command lines on a shell script on Ubuntu,
one of those is a pi calculation.
It works fine when i run it on terminal via the following cmd line:
time echo "scale=6500;4*a(1)" | bc -l
But when I run it on a script I get no luck. Typing in time before I execute the script i.e.
Hi I got a simple question, I want to write a shell script where I input the variable when I execute the script
for example
Code:
./script.sh var1
where it will execute script.sh using var1 as the variable, which is used in the script.
hi gurus.
I have a little script that runs java from a certain directory. This script runs fine when run manually but when I try to schedule it, it fails to find the script.
Hi Friends,
Iam invoking another shell script to create B2k_session_id from my shell script.It is properly creating B2k_session_id and after creation control is coming out from the script and going to command prompt.The lines which are after the exectrusteduser.com sh.com are not executing..may be B2k create file have exitscript logic..how to continue my shell script execution process with out g
Hello,
I try to run a script shell from a java program:
Quote:
Runtime.getRuntime().exec(myShellScript);
but it runs only if i do :chmod 777 myShellScript in the terminal
Please how can i insert chmod 777 in my java code without going through the terminal?
Thank you
Hello please kindly solve these doubts i have about the following scripts
Code:
Script 1
//Shell script that accepts arguments and prints them in reverse order//
echo "number of arguments"
len=$#;
while [ $len -ne 0 ]
do
eval echo \$$len
len=`expr $len - 1`
done
---------
Output
$sh test.sh a b
b
a
1.what is \$$len.what is the significance of the escape sequence
Script 2
Cod