summaryrefslogtreecommitdiff
path: root/oedquery.sh
diff options
context:
space:
mode:
Diffstat (limited to 'oedquery.sh')
-rwxr-xr-xoedquery.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/oedquery.sh b/oedquery.sh
index 50e9fd2..e21c6f0 100755
--- a/oedquery.sh
+++ b/oedquery.sh
@@ -82,7 +82,7 @@ _thes() {
_getdata
count=0
for json in $(echo "${result}" | jq -r '.results[].lexicalEntries[0].entries[0].senses[0].synonyms[] | @base64'); do
- output="$output $(_jq '.text') "
+ output="$output $(_jq '.text'), "
((count=count+1))
# Limit output to a resonable number of synonyms
if [[ $count -ge $maxSynonyms ]]
@@ -90,6 +90,8 @@ _thes() {
break
fi
done
+ # remove trailing comma and space
+ output=$(echo $output | sed '$s/,$//')
echo $output
exit 0
}
@@ -150,7 +152,7 @@ then
elif [[ ${word} =~ "-a" ]]
then
_audio
-elif [[ ${word} =~ "-d" ]]
+elif [[ ${word} =~ "-wod" ]]
then
_wod
else