nav-left cat-right
cat-right

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#!/bin/sh for file in $(find -iname *.bmp); do mogrify -verbose -format png $file; done The solution is to use ‚read‘ in the following way #!/bin/sh find . -iname "*.bmp" | while...

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#!/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#!/bin/sh for file in $(ls -A); do mv...

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 "$i.wav" "$dest" rm "$i" "$i.wav" done#!/bin/bash # # Convert m4a to mp3 for i in $1/*.m4a do mplayer -ao pcm "$i" -ao...

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 # be converted # # -t ENCODING # specify the encoding to which the filename(s) should be converted # # -i interactive mode (ask y/n for each action) # # -r...

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 "$1" shift ;; *.zip) unzip "$1" shift ;; *.ace) unace e "$1" shift ;; *.rar) unrar x "$1" shift ;;...
Seite 1 von 3123