shell兩個(gè)腳本是怎樣連起來(lái)的?相信很多人對(duì)shell兩個(gè)腳本連接的了解處于懵懂狀態(tài),小編給大家總結(jié)了以下內(nèi)容。如下資料是關(guān)于shell兩個(gè)腳本連接方法的內(nèi)容介紹。
10年積累的成都網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶對(duì)網(wǎng)站的新想法和需求。提供各種問(wèn)題對(duì)應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先網(wǎng)站策劃后付款的網(wǎng)站建設(shè)流程,更有宿州免費(fèi)網(wǎng)站建設(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兩個(gè)腳本連接方法就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的參考價(jià)值,可以學(xué)以致用。如果喜歡本篇文章,不妨把它分享出去讓更多的人看到。
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。