<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                希望根據文件類型的不同,自動執行不同指令的腳本。 `mgo` ```shell #!/usr/bin/env bash #----------------------------------------------- # Author : hpy # Emal : yuan_hp@qq.com # # auto run some file! for example bash,fish,tcl, # python, cpp, gnuplot and so on #----------------------------------------------- dst=$(date +%Y%m%d%H%M%S.mgo) #臨時文件 function main(){ DefautRun $* test ! -f $1 && echo "不存在 $1 文件" | cat && exit ReadFileType $1 | cat #cat顯示是為了在win上不亂碼 } #帶有參數,則識別第一個參數,并根據文件不同類型選擇后續操作 function ReadFileType(){ case $1 in *.sh | *.fish | *.pl | *.tcl | *.tk | *.py | *.lua) chmod +x $1 && ./$1 ;; *.c) gcc -o $dst $1 && chmod +x $dst && ./$dst;; *.cpp) g++ -std=c++11 -o $dst $1 && chmod +x $dst && ./$dst;; *.go ) go build -o $dst $1 && chmod +x $dst && ./$dst ;; *.plt) gnuplot $1 ;; #gnuplot *.m) cd $(dirname $1) && dst=$(basename $1) && dst=${dst%%.*}&& matlab -nosplash -nodesktop -r $dst ;; #matlab文件 * ) echo "Fuck! I don't konw what it is!" ;; esac test -f $dst && rm $dst &>/dev/null } #當不帶參數輸入時 找run或者run.sh文件運行 function DefautRun(){ if [ -z $* ] ;then if [ -f run ] ;then chmod +x run ./run elif [ -f run.sh ] ; then chmod +x run.sh ./run.sh else echo "Fuck! Fuck! No parameters, no run file or run.sh file, what do you want?" fi exit fi } main $* ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看