我想用 iconv 更改多个 php 文件编码。
我使用 find 和 exec 选项(参考:http://linux.bigresource.com/Ubuntu-Encoding-Conversion-on-Multiple-Files--4fuXvUwbN.html http://linux.bigresource.com/Ubuntu-Encoding-Conversion-on-Multiple-Files--4fuXvUwbN.html)
find . -type f -name '*.php' -print -exec iconv -f euc-kr -t utf-8 {} -o {}.utf8
但错误发生了。
find: missing argument to `-exec'
我只想一次性转换所有 php 文件。
我怎样才能用 bash 中的一条语句来做到这一点?
你必须把\;
or +
在结束时-exec
action.
find . -type f -name '*.php' -print -exec iconv -f euc-kr -t utf-8 {} -o {}.utf8 \;
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)