#!/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
else
echo "The file 'common_ins.rc' does not exist,program abort."
exit 1
fi
if [ ! -d $HOME/batchTrade ]; then
mkdir $HOME/batchTrade
chmod 777 $HOME/batchTrade
fi
#£¡/bin/echo Warning£ºthis library should be sourced!
#ostype():
ostype()
{
osname=`uname -s`
OSTYPE=UNKNOWN
case &osname in
"FreeBSD") OSTYPE="FREEBSD"
;;
"SunOS")¡¡OSTYPE="SOLARIS"
;;
"Linux") OSTYPE="LINUX"
;;
esac
return 0
}
evenodd()
{
LAST_DIGIT=`echo $1 | sed `s/\(.*\)\(.\)$/\2/``
case $LAST_DIGIT in
0|2|4|6|8 )
return 1
;;
*)
return 0
;;
esac
}
isalive()
{
NODE=$1
$PING¡¡-c 3 $NODE > /dev/null 2>&1
if [ $? -eq 0 ]
then
return 1
else
return 0
fi
}
#!/bin/sh
sqlfile=$1
cat $sqlfile | while read LINE
do
tmp=`echo "$LINE" |awk -F "-+=" '{print toupper($1)}'`
echo $tmp
done
#!/bin/sh
epoch_days=719591
second='date +'%s''
minute='date + '%M''
hour='date +'$k''
day='date +'%d''
month='date + '%m' | sed 's/0*//''
yaer='date + '%Y''