Hi all I am new to shell scripting and please help me in this situation.
I have created a shell script named ./remote1 which looks like below.
# ./remote1 file
ssh [email protected] 'bash -s' < ./createdir
Here 'createdir' is another file i had created which is given below
# ./createdir file
echo "give directory name"
If I run the ./createdir alone in my machine, it will execute without any problem.
If I execute ./remote1, it will not wait for input the data for the 'read' command.Please anyone could help me to solve this problem.
Thanks in advance.