| | |
A wierd problem
Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Feb 2006
Posts: 4
Reputation:
Solved Threads: 0
Hi !
This is the code of a script main.sh
Now this script reads from a file test.txt and calls another script temp.sh.
Here is temp.sh
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
This is the code of a script main.sh
Shell Scripting Syntax (Toggle Plain Text)
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
Shell Scripting Syntax (Toggle Plain Text)
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
![]() |
Similar Threads
- LCD on iMac went monochrome! (OS X)
- Keep getting stupid ERROR messages (Windows NT / 2000 / XP)
- Random Shutdowns/Restarts (Windows NT / 2000 / XP)
- Wierd Problem please help! (Windows NT / 2000 / XP)
- XP Explorer Problem (Windows NT / 2000 / XP)
Other Threads in the Shell Scripting Forum
- Previous Thread: command line arguments problem.
- Next Thread: Need some help
| Thread Tools | Search this Thread |
Tag cloud for Shell Scripting





