shell编程

shell脚本学习中

http://stephen830.iteye.com/blog/646369

1. shell 字符串处理

 

2. shell 操作mysql

 

#!/bin/bash

#这是shell脚本

date=`date -d '1 days ago' +%F|cut -d "-" -f 1-3`

peopleNum=`mysql -hip -uusername -ppassword -D dbname -e "select count(id) tuser from mobile_contacts_upload_info where upload_time like '%$date%';"`
echo $peopleNum
tuser='tuser='${peopleNum:6}
echo $tuser

输出结果:tuser=3352

 

3. shell发送http请求

 

    curl -d parm1=1&param2=zzq&param3=123 http://www.iteye.com

 

 

你可能感兴趣的:(编程,mysql,脚本,bash,mobile)