fixed run from urlfixed run from url

This commit is contained in:
alanw 2023-05-09 14:58:30 -07:00
parent 0bd9104a89
commit 876da7521c

View file

@ -574,7 +574,7 @@ run-from-url(){
args=${*:2}
# boxline "args=$args"
# check the interpreter using the shebang at the top of the file
interpreter=$(curl -ks $url | head -n 1 | cut -c 2- 2>/dev/null)
interpreter=$(curl -ks $url | head -n 1 | sed -n -e 's\/\#//g' 2>/dev/null)
# boxline "interpreter=$interpreter"
# In case of missing shebang, default to bash
if [ -z $interpreter ] ; then