3 ms·
Right, so have Terminal run this instead: #!/bin/sh for shell in \ /opt/local/bin/bash \ /bin/bash \ /bin/sh do [ -x "$shell" ] && exe
by RJIb8RBYxzAMX9u 10y ago
Right, so have Terminal run this instead:
#!/bin/sh
for shell in \
/opt/local/bin/bash \
/bin/bash \
/bin/sh
do
[ -x "$shell" ] && exec "$shell" -l
done
echo >&2 "ERROR: No valid shell found!"
read -r -s -n 1 -t 10 dummy
exit 1
- QuercusMax 10y agoIf you are able to run a script with #!/bin/sh, and /bin/sh becomes un-executable during the execution of your script, you're definitely having a bad time. :D