КОНЬЯКОВ.ру

Аудит, Разработка, ИБ, Поддержка и SEO сайтов

Category: Bash

Advanced Bash-Scripting Guide

An in-depth exploration of the art of shell scripting here (http://www.tldp.org/LDP/abs/html/) or here (local copy)…

Bash script to mass convert files from UTF-8 to Windows-1251

[shell]$ nano converter.sh

#/bin/bash
LIST=`ls *.php`
for i in $LIST;
do iconv -f UTF8 -t WINDOWS-1251 $i -o $i."windows-1251";
mv $i."windows-1251" $i;
done

[shell]$ chmod +x converter.sh
[shell]$ ./converter.sh

© 2007–2017, konyakov.ru