]> git.nbdom.net Git - nb.git/commitdiff
no more space for link
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 14 May 2023 22:59:17 +0000 (00:59 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 14 May 2023 22:59:17 +0000 (00:59 +0200)
lib/postgres/nginx_var.sh

index 442b42bcb19844104ba5125a54ba1439cf427971..68500b17ccfaac24bf8089979655cb764b2d226a 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/bash -l
 http_get https://nginx.org/en/docs/varindex.html \
 | xmllint --html --xpath "/html/body//div[@id=\"content\"]//p" - 2>/dev/null \
-| sed -E -e "s,<a href=\"([^\"]+)\">([^<]+)</a> *(\(([^\)]+)\))?,https://nginx.org/en/docs/\1\t\2\t\4\n,g" -e "s,<[^>]+>,,g" \
+| sed -E \
+       -e "s, *<a href=\" *([^\"]+)\">([^<]+)</a> *(\(([^\)]+)\))?,https://nginx.org/en/docs/\1\t\2\t\4\n,g" \
+       -e "s,<[^>]+>,,g" \
 | grep -v "^ *$" | sed "s,(\([^(]\+\))$,\1,g" \
 | awk 'BEGIN{FS="\t"}{print $2"\t"$3"\t"$1}' \