On Jan 31, 2008, at 10:29 AM, Juan Manuel Palacios wrote:
USHELL="$(nicl . -read /users/rschmidt shell | sed 's/^shell: //'')"
In any case, your suggestion seems straight forward and simple enough, so I'll quit trying to reinvent the wheel and will give it a shot as soon as I get a few spare minutes (there are some implementation details, like nicl for < 10.4 and dscl for Leopard, among others).
except that you want to use dscl instead of nicl (and then need to tweak the sed pattern). Something like: dscl . -read /users/dluke shell | sed 's/^.*shell: //' -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+