bash :: Enum files
IDX=0 ; for TMP in $(ls) ; do IDX=$(($IDX+1)) ; cp $TMP $IDX.ext ; done
bash :: Resize with orig aspect to max size [Source]
for TMP in *jpg ; do convert $TMP -resize 640x400\> 640_$TMP ; done
bash :: String manipulation, String Operators
TMP2=${TMP1// /_} # replace sed 's/ /_/g'
TMP2=${TMP1:1} # remove first char of TMP1
TMP2=${TMP1::-1} # remove last char of TMP1
TMP2=${TMP1##*:} # last element of string (separator :)
TMP2=${TMP1/*foo*/} # if foo is not substring of TMP1, then TMP2 is empty
bash :: convert filenames from iso to utf8
detox -nrv -s iso8859_1 directory/
bash :: send message to xfce desktop
notify-send "Header" "Text of message" # as X user su $USER -c 'DISPLAY=:0 notify-send "Header" "Text of message"' # as root
bash :: div snippets
for i in $(seq 701 726) ; do echo "$i "; done >> s7.txt # numbering