#!/bin/bash tesseract='C:\Program Files (x86)\Tesseract-OCR\tesseract' boxcutter="$HOME/Desktop/boxcutter-1.5/boxcutter" jq="$HOME/Desktop/boxcutter-1.5/jq-win64.exe" while true; do echo 'Press a key to google...' read -s -n 1 "$boxcutter" --coords 915,266,1015,305 ques.png text="$("$tesseract" ques.png -psm 6 stdout | tr $'\n' ' ')" encoded="$(echo "$text" | "$jq" -s -R -r @uri)" start "https://www.google.fr/search?q=$encoded" done