Created
March 18, 2012 20:06
-
-
Save espadrine/2080717 to your computer and use it in GitHub Desktop.
Get the definition of a french word from the command-line shell.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# INSTALL: Put this in a shell script (eg, `~/bin/robert`). | |
# USE: `$ robert anticonstitutionnellement`. | |
wordId=$(curl "http://petitrobert.bvdep.com/list.asp?word=$1" \ | |
-b "PR1Login=OK" 2>/dev/null \ | |
| sed -En "/onload/{s/.*'([A-Z0-9]+)'.*/\1/ | |
p | |
}") | |
open "http://petitrobert.bvdep.com/doc.asp?doc=$wordId" >/dev/null 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment