Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- # A way to quickly call up those HTML entity conversions you don't need often.
- # call by refent.sh [SECTION]
- # this refers to refent.txt which is here: http://pastebin.com/fTs9vpJs
- section=$(echo "${1^^}")
- case "$section" in
- "GR"*) cat /home/refent.txt | sed -e '/./{H;$!d;}' -e 'x;/GREEK/!d;' | zenity --text-info --width 400 --height 400 --title="$1" ;;
- "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" ;;
- "ACC"*) cat /home/refent.txt | sed -e '/./{H;$!d;}' -e 'x;/ACCENTS/!d;' | zenity --text-info --width 400 --height 400 --title="$1" ;;
- "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" ;;
- "*") echo "You need to choose an appropriate section" ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment