mongo-js-20141126
程序员文章站
2022-05-30 19:15:42
...
#!/bin/sh# 创建一个0字节文档,如果存在,则清空。:subsidiaryCode.txttlist=`cat ./AccountGuid.txt`;for i in $tlistdoTEMP_LIST=$i;# 打印出$TEMP_LIST取到的值# printf AccountGuid:$TEMP_LIST\n;mysql -h 172.24.0.220 -uquery -pquery che001 -NB EOF
#!/bin/sh # 创建一个0字节文档,如果存在,则清空。 :>subsidiaryCode.txt tlist=`cat ./AccountGuid.txt`; for i in $tlist do TEMP_LIST=$i; # 打印出$TEMP_LIST取到的值 # printf "AccountGuid:$TEMP_LIST\n"; mysql -h 172.24.0.220 -uquery -pquery che001 -NB Referal_user_Id.txt select ReferalGuid,UserGuid from KyPayAccounts where AccountGuid='$TEMP_LIST'; EOF #获取Referal_user_Id Referal_user_Id=`cat ./Referal_user_Id.txt`; #判断Referal_user_Id是否为空 if [ "$Referal_user_Id"x = x ] then echo "Error: failed to get AccountGuid $TEMP_LIST date , Referal_user_Id in not exist !"; #exit -1 fi ReferalId=`echo "$Referal_user_Id"|awk '{print $1}'`; userId=`echo "$Referal_user_Id"|awk '{print $2}'`; mongo --quiet localhost:27020/che001 -uquery -pquery >subsidiaryCode.txt //mongo --quiet localhost:27020/che001 -uquery -pquery
上一篇: php基础 关于继承的使用方法