[geeks] OpenSolaris ready for Production?

Mike Meredith very at zonky.org
Wed Mar 4 01:42:39 CST 2009


On Tue, 3 Mar 2009 22:55:19 -0500 (EST), Sandwich Maker wrote:
> i'm puzzled.  how is any of this better than
> test -x <shell> && exec <shell>

% sudo chmod +x /bin/funnyshell
% sudo chmod a+rx /bin/funnyshell
% text -x /bin/funnyshell && exec /bin/funnyshell

I used to use test -x (actually 'if [ -x') until I ended up with a
mysteriously truncated shell. The '-c true' test not only verifies that
a file is executable, but executes it.

-- 
Mike Meredith (http://zonky.org/)
 There has been such a thing as letting mankind alone; there has never
 been such a thing as governing mankind [with success]
  -- Zhuangzi



More information about the geeks mailing list