That was not quite what Scrutinizer proposed: using positional parameters $1 and $2 . You'd need to call it like ./Myscript.sh $T_SAMPLE_TEST $MTT , then.
Or, export the two variables in the parent shell before calling the script, as shell variables are not inherited per se.
Thanks it worked and I have scenario to run this from other unix server so how do I need to give the arguments over there. Below are the scripts
1.
Myscript
---------- Post updated at 01:49 PM ---------- Previous update was at 10:47 AM ----------
Hi,
When I run the below script from other unix server in same network It ask password and need to give it manually. Is there anyway how to give the password for other server with in the network in the below script .
When I run the below script from other unix server in same network It ask password and need to give it manually. Is there anyway how to give the password for other server when it's in the same network in the below script .
Basically the script will be executed by Control-M scheduler and does this require Public Authentication key or can I keep the password in the script and what will be the syntax. Because what I heard is the Public Authentication Key is not required for the Control- M execution. Please correct me if I am wrong.
I've absolutely no clue what "Control-M" is and how it possibly works and interoperates with other applications. But, you're using ssh in your script, and, reading between your lines, some authentication IS required to fulfill your needs. "Public key auth." is one option for this amongst others.
Its setup is described in ssh 's man page and in many contributions in these forums, so it wouldn't make sense to repeat it for the n+1. time. Try it yourself and come back when you're stuck.