1

Running scripts from a list

view story
linux-howto

http://www.unix.com – I am writing a bash script to run test some scripts. The names scripts of the scripts to tests are stored in an array. Code: scptArr[1]='chcksfrd.bash' scptArr[2]='compute-misfit.bash' scptArr[3]='compute-travel-times.bash' scptArr[4]='create-data-tinv.bash' scptArr[5]='create-docs.bash' scptArr[6]='create-model.bash' scptArr[7]='darwin-ga.bash' scptArr[8]='listdir.bash' scptArr[9]='plot-misfit.bash' scptArr[10]='plot-model.bash' When the user inputs a number, 7 say, I run the appropriate script in the array, for example: Code: darwin-ga.bash -h This I do using (HowTos)