Introduction
Introduction Statistics Contact Development Disclaimer Help
Add tsv output to outliner for BOL offers. - annna - Annna the nice friendly bo…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 5fdc2df6f37c61708409645c34cfe69c77543269
parent df56cd4e4c18155ad68bd3cf4db8666301d17518
Author: Annna Robert-Houdin <[email protected]>
Date: Fri, 1 Jan 2021 22:15:22 +0100
Add tsv output to outliner for BOL offers.
Diffstat:
M oneliner | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/oneliner b/oneliner
@@ -1,5 +1,8 @@
#!/bin/sh
+tsvoutput=0
+[ "$1" = "-t" ] && tsvoutput=1
+
curl -s https://ascii.co.uk/oneline \
| grep '/oneline/' \
| sed 's,.*href="\(/oneline/[^ "]*\)".*,https://ascii.co.uk\1,' \
@@ -9,6 +12,11 @@ do
oneliner="$(curl -s "${uri}" \
| grep '</span></pre></font></div>' \
| sed 's,</span></pre></font></div>,,')"
- 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
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.