954,525 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

A wierd problem

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

abhinav_shah
Newbie Poster
4 posts since Feb 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You