![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can give the input to prompt using shell script | Vaibhav Agarwal | Shell Programming and Scripting | 2 | 11-01-2007 03:26 AM |
| sudo in OS X shell script without password prompt?? | Brad_GNET | UNIX for Dummies Questions & Answers | 1 | 07-29-2005 07:36 PM |
| crontab and shell script that executes a sql. | radhika | Shell Programming and Scripting | 6 | 06-07-2005 12:33 AM |
| root executes a script as another user | tads98 | Shell Programming and Scripting | 1 | 05-17-2005 09:54 AM |
| script to change shell and prompt | SHYAM | Shell Programming and Scripting | 1 | 06-27-2004 09:46 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
shell script executes program, but waits for a prompt
Sorry, newbie here. I have the following shell script which basically executes the sh-n-body.i686 program a specified number of times. However, before the sh-n-body.i686 begins its calculations it prompts for input from the user. In this case the user would have press ". return" and sh-n-body.i686 will continue running. However, I just want the code to run about 100 times without having to enter . return. How can I modify the shell script so that it takes care of the prompt( . return).
#!/bin/sh COUNTER=0 while [ $COUNTER -lt 100 ]; do ./sh-n-body.i686 56 3 32 0.02 1 -2 | grep "longest shadow" let COUNTER=COUNTER+1 done Thank you |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|