Linux bash tricks and tips

Read all txt files, convert from UCS-2 to UTF-8 and print lines with text:

for f in *.txt; do cat $f | iconv -f UCS-2 -t UTF-8 | grep "Text"; done

Convert picture to 1x1px (average color/color summary) | except blank/empty lines and comments:

convert storm/000020196.png -resize 1x1  txt:- | grep -v '^$\|^\s*\#'

Send voice track to google for convert to text (i think that it doesnt work):

Tricks avconv/ffmpeg, SOX, ImageMagick

Convert video to images:

avconv -i -sameq output/%09d.png
avconv -i -same_quant output/%09d.png

Create video / timelapse: 5frames/s, best quality -qscale 1

ffmpeg -r 5 -qscale 1 -i input/%09d.jpg output.avi

Rename/sort images for avconv/ffmpeg input criteria:

Subscribe to tips