blob: 153afb4ac897852a6284deb668674ee6f94e0c87 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
 | #!/bin/sh
set -euf
tempfile="`mktemp /tmp/test.XXXXXXXX`"
trap "/bin/rm -f $tempfile" EXIT INT
urlparse "http://user:pass@domain.tld/path" > $tempfile
. $tempfile
[ $HOSTNAME == "domain.tld" ] && \
    [ $USERNAME == "user" ] && \
    [ $PASSWORD == "pass" ] && \
    [ $URIPATH == "/path" ] 
 |