On Jan 31, 2008, at 10:53, Daniel J. Luke wrote:
On Jan 31, 2008, at 11:25 AM, Ryan Schmidt wrote:
So we should set THE_UTIL to "nicl" on 10.4 and earlier, or "dscl" on 10.5 and up, and then use:
$THE_UTIL . -read /users/$USER shell | sed 's/^.*: //'
I don't see why you need to use nicl anywhere (if they both produce the same output as you say).
As an added bonus, dscl will work on 10.4 even if the user's information isn't stored in netinfo (whereas nicl won't).
Does dscl exist and work on 10.3 and earlier too? The manpage for nicl is from December 2000 which makes me think it exists back to the beginning of Mac OS X, whereas the manpage for dscl is from August 2003. 10.3 was released in October 2003 so maybe it does contain dscl. Can someone with 10.3 (Chris?) please test whether dscl . -read /users/$USER shell works on 10.3, and if so what its output is?