>>103231547
>line 2:
if kernel="$(curl --fail -s -L https://downloads.openwrt.org/snapshots/targets/x86/64/kmods | grep -ohE 'href=".*-.*"' | awk -F= '{print $2}' | awk -F'"' '{print $2}' | sed 's|/||g' | tail -1)"
>line 23:
new_kernel="$(echo "$kernel" | xargs -d'-' | sed '/^$/d' | awk '{print "V:" $1 "~" $3 "-r" $2}')"
It's time to learn Awk, anon.
>line 2:
if kernel="$(curl --fail -s -L https://downloads.openwrt.org/snapshots/targets/x86/64/kmods | awk -F'["/]' '/href=".*-.*/ {tail = $4} END {print tail}')"
>line 23:
new_kernel="$(echo "$kernel" | awk -F'-' '{print "V:" $1 "~" $3 "-r" $2}')"