in reply to Re^2: The importance of avoiding the shell
in thread The importance of avoiding the shell
The shell used by system is actually given by perl -V:sh.
$ perl -V:sh sh='/bin/sh';
If you want to find out if that's bash, you can use
$ ls -l /bin/sh lrwxrwxrwx 1 root root 9 Apr 10 17:08 /bin/sh -> /bin/bash
Like your code, that only works if and only if /bin/sh is a symlink. A more reliable check is
$ /bin/sh --version GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu) ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: The importance of avoiding the shell
by LanX (Saint) on Sep 29, 2014 at 13:36 UTC | |
by ikegami (Patriarch) on Sep 29, 2014 at 13:43 UTC |