aboutsummaryrefslogtreecommitdiffstats
path: root/tools/search_wikipedia.sh
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-11-16 11:09:40 +0800
committerGitHub <noreply@github.com>2024-11-16 11:09:40 +0800
commit86aa9106090a0219bac30bc12f5a5bd91949afd9 (patch)
tree69aef8c03242c67480c4edfe42a2cbf4c785b466 /tools/search_wikipedia.sh
parent6d30c22b82a5ac1a5775d8137c3b08a581770273 (diff)
downloadllm-functions-docker-86aa9106090a0219bac30bc12f5a5bd91949afd9.tar.gz
refactor: improve bash code (#125)
* refactor: extract guard_path to utils/guard_path.sh * add utils/guard_operation.sh
Diffstat (limited to 'tools/search_wikipedia.sh')
-rwxr-xr-xtools/search_wikipedia.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/search_wikipedia.sh b/tools/search_wikipedia.sh
index 0bf791e..6c7010d 100755
--- a/tools/search_wikipedia.sh
+++ b/tools/search_wikipedia.sh
@@ -17,7 +17,7 @@ main() {
title="$(echo "$json" | jq -r '.query.search[0].title // empty')"
pageid="$(echo "$json" | jq -r '.query.search[0].pageid // empty')"
if [[ -z "$title" || -z "$pageid" ]]; then
- echo "Error: No results found for '$argc_query'"
+ echo "error: no results for '$argc_query'" >&2
exit 1
fi
title="$(echo "$title" | tr ' ' '_')"