![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Running script from other user rather than login user | rawatds | Shell Programming and Scripting | 3 | 01-30-2009 01:18 PM |
| How do i change to super user then revert back to ordinary user ,using shell script? | wrapster | Shell Programming and Scripting | 3 | 06-04-2008 08:11 AM |
| Help with script, shutdown if no ping responce | ringofsteel | Shell Programming and Scripting | 39 | 01-08-2008 08:47 AM |
| booting up but the system was waiting for user interaction at console | stancwong | UNIX for Dummies Questions & Answers | 1 | 11-29-2005 11:51 AM |
| read-waiting for user response | giannicello | Shell Programming and Scripting | 4 | 05-12-2003 01:43 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Script not waiting for user responce
hi all,
Im fairly new to scripting and am having a noobish issue. Ive got a script that checks for certain directories and if they dont exist, prompts the user to do a mkdir. heres trouble spot in the script: cat dirlsttemp.dat | while read dir; do echo "$dir does not exist, would you like to create it now? (y or n)" read responce if [ $responce == "y" ]; then mkdir $dir else echo "$dir has not been created" fi done fi what essentially happens is it does not wait for the responce and goes right to the else. i believe it has something to do with reading from the cat...but I dont know any other way to read that file line by line. Any solutions? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|