Yahoo奇摩 網頁搜尋

  1. shell script if else 相關
    廣告
  1. 我用 C shell script 寫 #! /bin/csh -f if (-e /etc/host) then /bin/cp /etc/host /tmp/xx set EXISTING = 1 else set EXISTING = 0 endif while (1) if (-e /etc/host) then if (! $EXISTING...

  2. ...26 21:51:13 補充: 用 Korn Shell Script 寫的, 程式如下: #!/usr/bin/ksh if [[ $# -ne 2 ]] ; then echo "Usage...to TargetFile" exit 1 else sfile=$1 dfile=$2 fi if [[ ! -f $sfile...

  3. ...感覺你是要傳遞參數到pg2裡面, 這跟 shell script 無關, 應該跟你的pg2怎樣處理字串...755 #!/bin/csh -f foreach word ($argv) if ($?newvar) then foreach nword ($newvar...set fDup=1 break else set fDup=0 endif...

  4. ... if [ $x = 10 -a $x != $y ];then if [ "$z" = "abc" -o...echo "YES" else echo "NO"...第二個 shell script ...

  5. ...echo "The Last Number : "$ANS 32 exit 33 else 34 var[i]=$tmp 35 if [ "$i" != "1" ] 36 then 37 echo $ANS" - "${var[i...

  6. ...的來回答您的問題 : 九九乘法表 shell script #!/bin/bash for (( i=1; i<...do Y=$(( $X % $i )) if [ $Y -eq 0 ] then Z... is TRUE" else echo "Prime Number...

  7. ... input a number : read nNumber if [ -z "$nNumber" -o -n "$(echo $... -gt 100 ] then echo Invalid number! else break fi done nCount=0 while [ $nCount...

  8. ...-Z]$' 1>/dev/null 2>&1 return $? } if [ $# -eq 1 ] then ! PhoneOk "$1" &&...1:$2 >>tel.txt echo New entry $1:$2 added else echo Wrong arguments fi

  9. ...條件判斷 : if ......... else ............fi if [ $r == 1 ]; then echo "$1 為奇數" else echo "$0 為偶數" fi...不好意思 , 不幫你寫程式囉 ! 你須要的 Shell Script 程式入門 , 可以參考下面網站 等...

  10. ...key if [ $key = $var1 ]; then echo "You input $var1" exit else if [ $key = $var2 ]; then echo "You input $var2" exit...

  1. shell script if else 相關
    廣告