aboutsummaryrefslogtreecommitdiff
path: root/urlinfo
blob: 7a4cd49f79b0bf7a433d1ab1df280b29cadbe40f (plain)
1
2
3
4
5
6
7
8
9
10
11
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"