Closed jelliedpizza closed 3 years ago
I found the issue but I didn't really delve into it too deep. I have a different version of awk (there are 3 for some reason), and in my version, the old one, regexp characters have to be escaped with a backslash. So
file_name=$(printf '%b' "$(echo $file_url \
| awk -F'/' '{gsub("%","\\x");gsub("+"," ");print $NF}')")
^
should be
file_name=$(printf '%b' "$(echo $file_url \
| awk -F'/' '{gsub("%","\\x");gsub("\+"," ");print $NF}')")
^
awk: line 1: regular expression compile failed (missing operand)