diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-08-20 20:42:26 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-08-20 20:42:26 -0300 |
commit | d1791e72e2e1442033cad2ad7ef1dd183562ddec (patch) | |
tree | 1a6f087ba2d77d6a7f69230da2ec8ba30c5b0f00 /dict | |
download | utils-doc-d1791e72e2e1442033cad2ad7ef1dd183562ddec.tar.gz utils-doc-d1791e72e2e1442033cad2ad7ef1dd183562ddec.tar.bz2 |
Initial import
Diffstat (limited to 'dict')
-rwxr-xr-x | dict | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +#!/bin/bash +# +# Dictionary wrapper. +# + +# Parameters +BASENAME="`basename $0`" +DICT="/usr/bin/dict" + +# Dispatch +if [ -x "$DICT" ]; then + $DICT "$@" +else + if which surfraw &> /dev/null; then + surfraw wiktionary "$@" + else + echo "error: no suitable dictionary found in the system" + exit 1 + fi +fi |