aboutsummaryrefslogtreecommitdiff
path: root/urlsave
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2021-02-19 16:05:56 -0300
committerSilvio Rhatto <rhatto@riseup.net>2021-02-19 16:05:56 -0300
commit835d41f2cd5eafbbd5ff92eae66b1a0d91c5547b (patch)
treecef7bb01004aed29728977cb928f0789491d54be /urlsave
parentfd636e5779ff348a7b06cbdf5c36a3849f1e4d3b (diff)
downloadscripts-835d41f2cd5eafbbd5ff92eae66b1a0d91c5547b.tar.gz
scripts-835d41f2cd5eafbbd5ff92eae66b1a0d91c5547b.tar.bz2
Feats: enhance urlinfo and creates urlsave
Diffstat (limited to 'urlsave')
-rwxr-xr-xurlsave20
1 files changed, 20 insertions, 0 deletions
diff --git a/urlsave b/urlsave
new file mode 100755
index 0000000..afef452
--- /dev/null
+++ b/urlsave
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# Save URL info in a file as a simple bookmarking service.
+#
+
+# Parameters
+CONFIG="$HOME/.custom/urlsave"
+
+# Load config
+if [ -e "$CONFIG" ]; then
+ source $CONFIG
+fi
+
+# Check
+if [ -z "$URLFILE" ] || [ ! -e "$URLFILE" ]; then
+ URLFILE="/dev/stdout"
+fi
+
+# Dispatch
+urlinfo $* >> $URLFILE