Introduction
Introduction Statistics Contact Development Disclaimer Help
Return error, if oneliner service failed. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit bd2bee0857cd1561ac72a21cca90d38ba1961141
parent 5fcc271628f2f43baad1ebb7c1eff44e3d179c2b
Author: Annna Robert-Houdin <[email protected]>
Date: Sat, 2 Jan 2021 16:28:07 +0100
Return error, if oneliner service failed.
Diffstat:
M oneliner | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/oneliner b/oneliner
@@ -12,11 +12,16 @@ do
oneliner="$(curl -s "${uri}" \
| grep '</span></pre></font></div>' \
| sed 's,</span></pre></font></div>,,')"
- if [ $tsvoutput -gt 0 ];
+ if [ -z "${oneliner}" ];
then
- printf "%s\t%s\n" "${oneliner}" "${uri}"
+ return 1
else
- printf "%s ( %s )\n" "${oneliner}" "${uri}"
+ if [ $tsvoutput -gt 0 ];
+ then
+ printf "%s\t%s\n" "${oneliner}" "${uri}"
+ else
+ printf "%s ( %s )\n" "${oneliner}" "${uri}"
+ fi
fi
done
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.