diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2021-02-14 13:14:20 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2021-02-14 13:14:20 -0300 |
commit | fd636e5779ff348a7b06cbdf5c36a3849f1e4d3b (patch) | |
tree | 86279897feec10c80f194714ed0910c6712f5398 | |
parent | 0f985c6acea52db5ba6cd738692bb9b7ee9e3eef (diff) | |
download | scripts-fd636e5779ff348a7b06cbdf5c36a3849f1e4d3b.tar.gz scripts-fd636e5779ff348a7b06cbdf5c36a3849f1e4d3b.tar.bz2 |
Feat: urlinfo script
-rwxr-xr-x | urlinfo | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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" |