[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] why bash when ksh is default?
- Subject: [ale] why bash when ksh is default?
- From: geof at denali.is.net (Unix Guru Dude)
- Date: Mon, 18 Mar 1996 10:42:47 -0500 (EST)
}
}
}On the SVR4 I'm using, /sbin/sh is executed for such a script, according
}to the output of truss:
}
}
}$ echo $SHELL
}/usr/bin/bash
}
}$ cat test.sh
}echo THIS is a test script $0
I believe this is a function of you login shell, /usr/bin/bash. Humor me,
try this:
exec ksh # full path mind you
export SHELL=ksh # ditto
echo '[[ -x $0 ]] && date' > test.sh
chmod 700 test.sh
./test.sh
If it runs via /bin/sh, it will fail to recognize the '[[' construct.
My expectation is that since SHELL is set to ksh, the shell will be run
with ksh...
}
}$ truss -o /tmp/test.sh.truss test.sh
truss? New to me...........
--
Until later:
Geoffrey Myers geof at denali.is.net eiger at ichange.com gamyers at attmail.com
http://www.ticllc.net/~geof
Opinions expressed by me are mine, all mine, only mine.....