shell兩個腳本是怎樣連起來的?相信很多人對shell兩個腳本連接的了解處于懵懂狀態(tài),小編給大家總結(jié)了以下內(nèi)容。如下資料是關(guān)于shell兩個腳本連接方法的內(nèi)容介紹。
主要從事網(wǎng)頁設(shè)計、PC網(wǎng)站建設(shè)(電腦版網(wǎng)站建設(shè))、wap網(wǎng)站建設(shè)(手機版網(wǎng)站建設(shè))、成都響應(yīng)式網(wǎng)站建設(shè)公司、程序開發(fā)、微網(wǎng)站、成都小程序開發(fā)等,憑借多年來在互聯(lián)網(wǎng)的打拼,我們在互聯(lián)網(wǎng)網(wǎng)站建設(shè)行業(yè)積累了豐富的成都網(wǎng)站制作、網(wǎng)站設(shè)計、網(wǎng)絡(luò)營銷經(jīng)驗,集策劃、開發(fā)、設(shè)計、營銷、管理等多方位專業(yè)化運作于一體,具備承接不同規(guī)模與類型的建設(shè)項目的能力。
#!/bin/bash
#
#This is for auto run the script to save the time
#
#By bobo5620301@163.com
#chose the latest 10 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 you like 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]}
10. ${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]} ;;
10 ) command=${array[9]} ;;
* ) echo "Number not found" ;;
esac
done
# when we chose the file and we will 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
關(guān)于shell兩個腳本連接方法就分享到這里了,希望以上內(nèi)容可以對大家有一定的參考價值,可以學(xué)以致用。如果喜歡本篇文章,不妨把它分享出去讓更多的人看到。