From e4c84bb2d4a18bbfeca70bb17b7fb32515e3f963 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Tue, 28 Mar 2023 00:44:05 -0700 Subject: more comments --- home/xyz/.local/bin/curlqb | 10 ++++++++++ home/xyz/.local/bin/mrt | 1 + 2 files changed, 11 insertions(+) (limited to 'home') diff --git a/home/xyz/.local/bin/curlqb b/home/xyz/.local/bin/curlqb index c3f6871b..d40ff6d1 100755 --- a/home/xyz/.local/bin/curlqb +++ b/home/xyz/.local/bin/curlqb @@ -11,3 +11,13 @@ curl -s 'https://github.com/qbittorrent/search-plugins/wiki/Unofficial-search-pl print url } ' | xargs curl -s -Z -L --remote-name-all --create-dirs --output-dir "$1" -- + +# an alternative awk command: +#awk -F'"' ' +#/require an account/ {exit} +#/\.py/ { +# url=$2 +# line=NR +#} +#url && NR==line+3 && !/❗|✖/ {print url} +#' diff --git a/home/xyz/.local/bin/mrt b/home/xyz/.local/bin/mrt index f370b48d..ffe5d3e5 100755 --- a/home/xyz/.local/bin/mrt +++ b/home/xyz/.local/bin/mrt @@ -26,6 +26,7 @@ mullvad relay update # https://stackoverflow.com/a/38972737/9008720 # https://stackoverflow.com/a/17988834/9008720 # https://unix.stackexchange.com/q/63891/459013 +# https://stackoverflow.com/a/17914105/9008720 for relay in $(mullvad relay list | awk -v location="$location" ' $0 ~ location {f=1;next} /^\t[[:alpha:]]/ {f=0} -- cgit v1.2.3-70-g09d2