convert Images in batch process

Converting images in a batch process is not difficult in general, but approaches like this fail at filenames/directories with spaces #!/bin/sh for file in $(find -iname *.bmp); do mogrify -verbose -format png $file; done The solution is to use ‘read’ in...

ucase / lcase

ucase In Großbuchstaben umwandeln #!/bin/sh # for file in $(ls -A); do mv $file $(echo $file | tr [a-z] [A-z]); done lcase In Kleinbuchstaben umwandeln #!/bin/sh for file in $(ls -A); do mv $file $(echo $file | tr [A-Z] [a-z]); done

m4a nach mp3

Konvertiert m4a Musikdateien nach mp3 m4aTomp3 #!/bin/bash # # Convert m4a to mp3 for i in $1/*.m4a do mplayer -ao pcm “$i” -ao pcm:file=”$i.wav” dest=`echo “$i.wav”|sed -e ‘s/m4a.wav$/mp3/’` lame -h -b 192...

latin1 nach utf8

Konvertiert alle Dateien rekursiv unterhalb des aktuellen Verzeichnisses von Latin1 (iso-8859-1) nach utf8 ConvertIsoCharset.script convmv -f iso-8859-1 -t utf8 -i -r –notest $1 # -f ENCODING # specify the current encoding of the filename(s) from which should #...

Dateien entpacken

Dateien über die Kommandozeile ohne Kenntnis des zum Packformat zugehörigen Progamms entpacken #!/bin/sh while [ x”$1″ != x ]; do case “$1” in *.tar.gz | *.tgz ) tar -xzf “$1” shift ;; *.tar.bz2 | *.tbz ) tar -xjf...