[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: retrieã??e data from bash shell?

Ikuta Lin

3/14/2008 4:12:00 PM

Ikuta Lin wrote:
> Hi
>
> I have a question here.
sorry about that.. btw how I delete my post..
If I want retrieve data from bash shell like as below
name=`$USER`

what can I do?

Thanks a lot!

--
Posted via http://www.ruby-....

1 Answer

WujcioL

3/14/2008 5:15:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

That's special variable called ENV that can be used like Hash. It have a lot
of information like USERNAME, PROCESSOR_ARCHITETURE and many more.
To print username use:
puts ENV["USERNAME"]

2008/3/14, Ikuta Lin <ikuta_lin@clousy.net>:
>
> Ikuta Lin wrote:
> > Hi
> >
> > I have a question here.
> sorry about that.. btw how I delete my post..
> If I want retrieve data from bash shell like as below
> name=`$USER`
>
> what can I do?
>
> Thanks a lot!
>
>
> --
> Posted via http://www.ruby-....
>
>