Tag: The shell connects two scripts.
#!/bin/bash
#
#This is for auto run the script to save the time
#
#By [email protected]
#chose the latest file and chose one to run
array[0]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n ' 2p '
array[1]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n ' 3p '
array[2]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n ' 4p '
array[3]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n ' 5p '
array[4]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n ' 6p '
array[5]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n ' 7p '
array[6]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n ' 8p '
array[7]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n ' 9p '
array[8]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n ' 10p '
array[9]= ' Ls-lt/mnt/shfw/builds/griffin/experimental | awk ' {print $9} ' | Sed-n ' 11p '
Cat << EOF
Select which one to run:
============================
1. ${array[0]}
2. ${array[1]}
3 ${array[2]}
4. ${array[3]}
5. ${array[4]}
6. ${array[5]}
7. ${array[6]}
8. ${array[7]}
9. ${array[8]}
Ten. ${array[9]}
Eof
While [! "${command}"]
Do
Echo-n "Select Commandistrator:"
Read ASTR
Case ${ASTR} in
1) command=${array[0]};;
2) command=${array[1]};;
3) command=${array[2]};;
4) command=${array[3]};;
5) command=${array[4]};;
6) command=${array[5]};;
7) command=${array[6]};;
8) command=${array[7]};;
9) command=${array[8]};;
) command=${array[9]};;
*) echo "number not found";;
Esac
Done
# When we chose the file and we'll run int with the below command one after one.
echo "The Select command is ${command}"
/home/mli/workspace/mkautows.sh/mnt/shfw/builds/griffin/experimental/${command}/sf3500a0satadebug/home/mli/ Workspace/autows
echo "/mnt/shfw/builds/griffin/experimental/${command}/sf3500a0satadebug"
/home/mli/workspace/cpfw_tcms.py--releasedir=/mnt/shfw/builds/griffin/experimental/${command}/ Sf3500a0satadebug--config=c35000301
This article is from the "bobo5620301" blog, make sure to keep this source http://bobo5620301.blog.51cto.com/946576/1714005
The shell connects two scripts.