I want to change the encoding of multiple php files using the icon.
I use the find and exec options (link: 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
But an error has occurred.
find: missing argument to `-exec'
I just want to convert all php files at once. How can I do this with a single statement in bash?
You must put either \; , or + at the end of the -exec action.
\;
+
-exec
find . -type f -name '*.php' -print -exec iconv -f euc-kr -t utf-8 {} -o {}.utf8 \;
after some tests finally found a solution working on my mac
for f in *.TXT; do iconv -f CP1250 -t utf-8 $f > $f.txt; done
Source: https://habr.com/ru/post/1481297/More articles:Codeigniter count_all for pagination - phpEmberjs looks up binding for Google map markers - javascriptHow to calculate topological distance using ArcMap or other software? - geometryHow to include a mezzanine page with a given slug in the base template? - djangoWhat circumstances ostream :: write or ostream :: operator << do not fall under? - c ++Custom event in backbone.js without binding - backbone.jsViewPager skips views on return, leaving blank - javaJQuery Select multiple dropdown sections - jqueryWhat is the performance of the βaddressβ of the operator? - c ++Does the "do not back up" attribute use data in the "Library / Caches", - filesystemsAll Articles