From: Nicolas Boisselier Date: Sat, 10 Sep 2016 13:22:34 +0000 (+0100) Subject: Get and Head X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=ff18d20f246c187bf6954d46915266badc9e6d36;p=nb.git Get and Head --- diff --git a/etc/profile.d/aliases b/etc/profile.d/aliases index 49aff946..33022756 100644 --- a/etc/profile.d/aliases +++ b/etc/profile.d/aliases @@ -41,10 +41,17 @@ test "$TERM_PROGRAM" = "iTerm.app" && export PROMPT_COMMAND='printf "\033]0;%s\0 #-------------------------------------------------------------------------------- # Get / Head # -alias Get='wget --no-check-certificate --quiet -O -' -function Head() { - wget --server-response --spider --no-check-certificate --quiet -O - $@ 2>&1|sed 's/^ *//' -} +#alias Get='wget --no-check-certificate --quiet -O -' +# NB 10.09.16 function Get() { +# NB 10.09.16 exec wget --tries 1 --no-check-certificate --quiet -O - $@ +# NB 10.09.16 } +# NB 10.09.16 function Head() { +# NB 10.09.16 Get --max-redirect 0 --server-response --spider $@ 2>&1|sed 's/^ *//' +# NB 10.09.16 #--tries 1 +# NB 10.09.16 #exec wget --server-response --spider --no-check-certificate --quiet -O - $@ 2>&1|sed 's/^ *//' +# NB 10.09.16 } +alias Get='lynx --source -dump' +alias Head='lynx --head -dump' # NB 15.07.15 function nbGet() { # NB 15.07.15 declare host port uri # NB 15.07.15 eval $(perl -ne 'm,^\s*\w+://([^/:]+)(?::(\d+))?(/.*)?\s*$, and print qq|host=$1 port=$2 uri=$3\n|' <<< "$@")