You are here Home > Know-how > Linux > Shell, bash > Character conversions

Linux Reference

6.1.2 Character conversions


20.02.2008
6.1.1 ~/.bashrc [  up  ] - [ top ] - [ linux a-z ] 6.1.3 inline rotate (keep <n> lines)

Convert a file from ISO-8859-1 to UTF-8 encoding.

Usage:

convert.sh <filename>

Shell script

# cat convert.sh
#!/bin/bash

echo $1

/usr/bin/iconv -f ISO-8859-1 -t UTF-8 -o ".$1" "$1"

/bin/mv -f ".$1" "$1"



copyright by retoh - created with mytexi