SHELL 你应该知道的语法

文献:http://www.verydemo.com/demo_c167_i100747.html

#!/bin/sh
#set -x
echo -n "can you write device drivers? "
read answer 
answer=`echo $answer | tr [a-z] [A-Z]`
if [ $answer = Y]
then 
 echo "Wow, you must be very skilled"
else 
 echo "neither can i "
fi


 

cat temp3.properties | while read LINE
do 
    row4index=`echo "$LINE" |  awk -F "=" '{print $1}'`
    index4index=`echo "$LINE" |  awk -F "=" '{print $2}'`
    cat temp5.properties | while read LINE4TYPE
    do
        row4dcc=`echo "$LINE4TYPE" |  awk -F "=" '{print $1}'`
        type4dcc=`echo "$LINE4TYPE" |  awk -F "=" '{print $2}'`
        cat temp7.properties | while read LINE4POSTPAIDFLAG
        do
            row4flag=`echo "$LINE4POSTPAIDFLAG" |  awk -F "=" '{print $1}'`
            type4flag=`echo "$LINE4POSTPAIDFLAG" |  awk -F "=" '{print $2}'`
            if [ $row4index -eq $row4dcc ] && [ $row4index -eq $row4flag ]
            then
                  echo "${index4index}|${type4dcc}|${type4flag}">>tempresult.properties
            fi
        done
    done
done


 

if [ -f $HOME/bus_gv_install/bin/common_ins.rc ]; then           
    . $HOME/bus_gv_install/bin/common_ins.rc                     
…………………………………………………………………………
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值