Hi !
This is the code of a script main.sh
while read line
do
chmod +x temp.sh
./temp.sh $line
done <test.txt
Now this script reads from a file test.txt and calls another script temp.sh.
Here is temp.sh
echo $1
rsh alpha11.xyz.com ls
Now the problem is, after executing temp.sh in main.sh, the while loop exits without iterating and reading the next line from the file test.txt
Now, if I remove the line "rsh alpha11.xyz.com ls" from temp.sh then the loop works perfectly fine and it reads the next line from test.txt
I hope you understood my problem.
Can anybody help ?