For Bash, use Google to get word definitions on the command line by putting this in your .bashrc file:
def () { lynx -cfg=/dev/null -dump "http://www.google.com/search?q=define%3A$*" | less; }
(Make sure that is all on one line)
Then type "def word" to get a definition for "word".
You can also create a shell script like so:
Then type "def word" to get a definition for "word".
You can also create a shell script like so:
#!/bin/csh -f lynx -cfg=/dev/null -dump "http://www.google.com/search?q=define%3A${1}" | less
This will work if you aren't using Bash. Make the script executable and put it in your search path (~/bin is a good place).
You need a copy of lynx (or better yet links) for this to work. The "-cfg=/dev/null" is optional for lynx, but should be removed if you are using links.
You need a copy of lynx (or better yet links) for this to work. The "-cfg=/dev/null" is optional for lynx, but should be removed if you are using links.
Comments
Post a Comment