aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xurlinfo12
1 files changed, 12 insertions, 0 deletions
diff --git a/urlinfo b/urlinfo
new file mode 100755
index 0000000..7a4cd49
--- /dev/null
+++ b/urlinfo
@@ -0,0 +1,12 @@
+#!/bin/bash
+#
+# Retrieve basic URL info.
+#
+
+# Parameters
+BASENAME="`basename $0`"
+URL="$1"
+
+# Dispatch
+DESC="`torify curl --max-redirs 10 -L -s $URL | grep -i "<title>" | sed -n 's/.*<title>\(.*\)<\/title>.*/\1/ip;T;q' 2> /dev/null`"
+echo "Title: $DESC"