Retrieve the username

Dear All,

How would I get the username in mac through ruby

like in windows I am using ENV[‘USERNAME’]

ENV[‘USERNAME’]- it gives nil in mac system

cheers
A

On a mac running OS X the username is in ENV[‘USER’]

Peter H. wrote:

On a mac running OS X the username is in ENV[‘USER’]

Cheers Peter. Thanks