#!/bin/bash convert_file() { for file in `find .` do if [[ -f $file ]] then if [[ ${file##*.} == lua || ${file##*.} == ini ]]; then cp $file $file".bak" iconv -f GB2312 -t UTF-8 $file > $file echo $file fi fi done } convert_file
原地址:http://www.xuanyusong.com/archives/2418#comments 最近在研究Unity3D脚本批量打包,比如在Android平台下各种不同分辨率和不同内存大小的机器,可能还有不同的渠道包,不同渠道可能用的SDK都不一样,这一切的一切都表明你的代码无法做到自适应的,除非批量打包提供各个平台的预定义标签#define . Unity默认提供了一些预定义标签如: UNITY_EDITOR : 编辑器模式下. UNITY_STANDALONE:PC Mac Li
使用 Shell 脚本批量创建数据表 系统:Centos6.5 64位 MySQL版本:5.1.73 比如下面这个脚本: #!/bin/bash #批量新建数据表 for y in {0..199};do mysql -uroot -proot -e "use mysql; create table user$y( id int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键,记录唯一标识', mail varchar(64) NOT NULL