aboutsummaryrefslogtreecommitdiff
path: root/urlsave
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-08-20 20:42:26 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-08-20 20:42:26 -0300
commitd1791e72e2e1442033cad2ad7ef1dd183562ddec (patch)
tree1a6f087ba2d77d6a7f69230da2ec8ba30c5b0f00 /urlsave
downloadutils-doc-d1791e72e2e1442033cad2ad7ef1dd183562ddec.tar.gz
utils-doc-d1791e72e2e1442033cad2ad7ef1dd183562ddec.tar.bz2
Initial import
Diffstat (limited to 'urlsave')
-rwxr-xr-xurlsave21
1 files changed, 21 insertions, 0 deletions
diff --git a/urlsave b/urlsave
new file mode 100755
index 0000000..e58245c
--- /dev/null
+++ b/urlsave
@@ -0,0 +1,21 @@
+#!/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
+echo "" >> $URLFILE
+urlinfo $* >> $URLFILE