重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

shell两个脚本连接方法介绍-创新互联

shell两个脚本是怎样连起来的?相信很多人对shell两个脚本连接的了解处于懵懂状态,小编给大家总结了以下内容。如下资料是关于shell两个脚本连接方法的内容介绍。

10年积累的成都网站设计、成都做网站经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站策划后付款的网站建设流程,更有宿州免费网站建设让你可以放心的选择与我们合作。

#!/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

关于shell两个脚本连接方法就分享到这里了,希望以上内容可以对大家有一定的参考价值,可以学以致用。如果喜欢本篇文章,不妨把它分享出去让更多的人看到。

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


本文名称:shell两个脚本连接方法介绍-创新互联
当前URL:http://cqcxhl.cn/article/esgsi.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP