Linux system operation, in addition to the use of tool conversion file encoding, but also through the shell, the use of the recursive principle of iconv function, as long as the simple shell script code, is to convert the file encoding batch.
principles: recursion, iconv
code is as follows
#! /bin/sh
TGT=“source_rst”
function fe_convert() {
for file in `ls $1`
do
if [ -d $1“/”$file ]
then
fe_convert $1“/”$file
else
mkdir -p `dirname $TGT“/”$1“/”$file`
iconv -f EUC-JISX0213 -t utf-8 $1“/”$file 》$TGT“ /”$1“/”$file
fi
done
}
fe_convert src
The above is for Linux The method of shell batch conversion file encoding is introduced. This article only has a simple code introduction, but it is more practical if it is better than tool conversion.
After installing Ubuntu system in the notebook, there are problems such as fast power consumption, w
Linux when using the find command error, prompt find: paths must precede expression, which is caused
Xen virtual machine can be used for server application integration, software development testing, et
The rename command in the Linux command is mainly used to rename files. It is simil
Linux system how to use the mount command and software to mount the ISO file
How to manage modules in the Linux kernel?
How to solve the problem of multi-line display of wget download progress bar in CentOS
How to detect the device name and writing speed of DVD burner under Linux
Ubuntu wireless network card search can not find a solution
Linux how to use the setfacl command to create a permission file
How to install Linux using the pidstat command
Linux setitimer function operation skills
Ubuntu download and install j2ee development environment steps
How to solve the problem that Linux does not limit the Limit value after opening SSH
Using Win7 recovery to reduce the risk of reloading to a minimum of
Lenovo notebook win7 system how to enter the BIOS settings interface
Change the startup order of Windows services
How to modify the shortcut key of input method switching under Win7 system
NTFS and FAT32 mutual conversion method under Vista system
Win7 web page watching video no sound how is it?
How to check the blue screen code of Win8?
How to turn off system partition restore function for Windows 7 system