![]() |
|
|
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 |
| passing argument to shell script that reads user inputs | patjones | Shell Programming and Scripting | 6 | 04-10-2009 06:42 PM |
| Script to find a string in a directory/sub-directory | gross | UNIX for Dummies Questions & Answers | 3 | 11-13-2008 04:45 PM |
| Shell script that reads from configuration file to get database | dolo21taf | Shell Programming and Scripting | 1 | 04-15-2008 08:47 PM |
| sh script that reads/writes based upon contents of a file | rdudejr | Shell Programming and Scripting | 3 | 07-12-2006 11:38 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
script that reads all the scripts in the directory and run them within that script
Hi I am trying to write a shell script that is reading all the scripts in the current directory (currently 5) and is allowing me to run the scripts that is in the directory. I want that this scripts asks te user to execute 1 of the listed scripts. I have 4 sample scripts in the directory: script1.sh script2.sh script3.sh script4.sh What I want to achieve more is that: - when the user selects a script the script should be executed and return to the menu again after it finishes the script in the directory - The input of the script should be visible for the user - The user has the option to quit the script in a clean fashion Here is my start for now... I am a litte stuck ... Code:
#!/bin/sh echo "Please Select a Script" read SCRIPTSINDIR #read the current directory and writes them to a file ls -l -S -r > $SCRIPTSINDIR #get the files from the directory more $SCRIPTSINDIR |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|