Hacker News new | ask | show | jobs
by RJIb8RBYxzAMX9u 3566 days 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
1 comments

If 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