Posted By

vikiyou on 03/23/11


Tagged

Bash linux


Versions (?)

Check run shell is bash on Linux


 / Published in: Bash
 

Check the shell run script if is bash.

  1. readlink -f /proc/$$/exe | grep -q bash || {
  2. echo >&2 "You must run $0 with bash!"
  3. exit 2
  4. }

Report this snippet  

You need to login to post a comment.