uriel1998

Show reference entities via BASH/Zenity

Feb 10th, 2012
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.86 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. # A way to quickly call up those HTML entity conversions you don't need often.
  4. # call by refent.sh [SECTION]
  5. # this refers to refent.txt which is here:  http://pastebin.com/fTs9vpJs
  6.  
  7. section=$(echo "${1^^}")
  8. case "$section" in
  9.     "GR"*) cat /home/refent.txt | sed -e '/./{H;$!d;}' -e 'x;/GREEK/!d;' | zenity --text-info --width 400 --height 400 --title="$1" ;;
  10.     "SYM"*) cat /home/refent.txt | sed -e '/./{H;$!d;}' -e 'x;/SYMBOL/!d;' | column  -c 2 | zenity --text-info --width 400 --height 400 --title="$1" ;;
  11.     "ACC"*) cat /home/refent.txt | sed -e '/./{H;$!d;}' -e 'x;/ACCENTS/!d;' | zenity --text-info --width 400 --height 400 --title="$1" ;;
  12.     "MA"*) cat /home/refent.txt | sed -e '/./{H;$!d;}' -e 'x;/MATHS/!d;' | column -c 2 | zenity --text-info --width 400 --height 400 --title="$1" ;;
  13.     "*") echo "You need to choose an appropriate section" ;;
  14. esac
Advertisement
Add Comment
Please, Sign In to add comment