Created
March 11, 2014 05:13
-
-
Save ziggear/9479865 to your computer and use it in GitHub Desktop.
姓名列表操作 bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# 1:列出文件夹下所有人的名字并保存成文件 | |
# 2:根据指定URL到Google生成QRCode并下载 | |
# | |
rm ./name_list.txt | |
rm -r ./QRCodes | |
mkdir ./QRCodes | |
i=0 | |
for name in *.jpg; | |
do | |
url="http://www.xxx.com/people/"$i | |
echo $i "${name%.*}" $url >> name_list.txt | |
curl "https://chart.googleapis.com/chart?cht=qr&chs=300x300&choe=UTF-8&chld=L%7C4&chl="$url -o ./QRCodes/"${name%.*}.png" | |
let i++; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment