Re: Owner/User Name in OSX
Re: Owner/User Name in OSX
- Subject: Re: Owner/User Name in OSX
- From: Simon Topliss <email@hidden>
- Date: Wed, 24 Apr 2002 19:00:05 +0100
Thanks for the reply, Steve,
That works a treat if I strip off the "\n" that's returned on the end of the
names.
set short_name to do shell script "whoami"
set short_name to (text 1 thru -2 of short_name)
set long_name to do shell script "niutil -readprop . /users/" & short_name &
" realname"
set long_name to (text 1 thru -2 of long_name)
display dialog short_name & " (" & long_name & ")"
Is there a way to get the shell script to return a result without the "\n"
at the end?
What's the ASCII number of "\n"?
Simon
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.