[download]

local/bin/ocr

   1 #!/bin/bash
   2 
   3 { cat "$1" || maim -s; } |
   4 tesseract -l rus+eng - - |
   5 sed '/./,$!d' | tac |
   6 sed '/./,$!d' | tac