scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

translate (211B)


      1 #!/bin/sh
      2 
      3 # Opens google translate
      4 
      5 translator="https://translate.google.com/"
      6 from=$1
      7 to=$2
      8 
      9 shift 2
     10 text=$(echo "$@" | sed 's/ /\%20/g')
     11 open-url "${translator}?sl=${from}&tl=${to}&text=${text}&op=translate"