Check These Out
opposite of https://www.commandlinefu.com/commands/view/10014/urldecoding-with-one-pure-bash-builtin ;-)
Looks up a word on merriam-webster.com, does a screen scrape for the FIRST audio pronunciation and plays it.
USAGE: Put this one-liner into a shell script (e.g., ~/bin/pronounce) and run it from the command line giving it the word to say:
$ pronounce lek
If the word isn't found in merriam-webster, no audio is played and the script returns an error value. However, M-W is a fairly complete dictionary (better than howjsay.com which won't let you hear how to pronounce naughty words).
ASSUMPTIONS: GNU's sed (which supports -r for extended regular expressions) and Linux's aplay. Aplay can be replaced by any program that can play .WAV files from stdin.
KNOWN BUGS: only the FIRST pronunciation is played, which is problematic if you wanted a particular form (plural, adjectival, etc) of the word. For example, if you run this:
$ pronounce onomatopoetic
you'll hear a voice saying "onomatopoeia".
Playing the correct form of the word is possible, but doing so might make the screen scraper even more fragile than it already is. (The slightest change to the format of m-w.com could break it).
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
To check if the table-of-content in a LaTeX document is up-to-date, copy it to a backup before running LaTeX and compare the new .toc to the backup. If they are identical, it is updated. If not, you need to run LaTeX again.
Shows all block devices in a tree with descruptions of what they are.
An other way to run it ( playing a random file ending with avi, flv or mpeg ) from a specified dir and a specified type of extension :
making MOVIE array with a glob :
$ MOVIE=( /PATH/TO/MY/FAVORITE/MOVIES/*.{avi,flv,mpeg} )
playing the random file from a random key from the array
$ mplayer ${MOVIE[ RANDOM % ( ${#i[@]} + 1 ) ]]}
I use only globs and a bash array.
I use GNU bash, version 3.2.48