Check run shell is bash on Linux


/ Published in: Bash
Save to your folder(s)

Check the shell run script if is bash.


Copy this code and paste it in your HTML
  1. readlink -f /proc/$$/exe | grep -q bash || {
  2. echo >&2 "You must run $0 with bash!"
  3. exit 2
  4. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.