User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 392,098 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,854 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser:
Views: 1133 | Replies: 0
Reply
Join Date: Feb 2006
Posts: 4
Reputation: abhinav_shah is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
abhinav_shah abhinav_shah is offline Offline
Newbie Poster

A wierd problem

  #1  
Feb 27th, 2006
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
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Shell Scripting Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 12:49 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC