一半君的总结纸

听话只听一半君

用sed命令替换.ma文件里的maya版本号 2013 –> 2012

sed -e 's/-ch [0-9]*/ /' oldMayaFile.ma > newMayaFile.ma


如果不想打re表达式 可以存在文件里

printf s/-ch [0-9]*// > maya12to13

然后这样用

sed -f maya12to13 oldMayaFile.ma > newMayaFile.ma

忘记从哪儿抄的了

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: