abhinav_shah 0 Newbie Poster

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 ?

Abhinav Shah
http://www.abhinav.frih.net

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.