"Sayed, Irfan (Irfan)" <[EMAIL PROTECTED]> writes:
> Hi All,
>
> I am executing my $usr=qx("who am i"); to get the user id on unix
> machine but it is giving error. sh: who am i: not found
>
> Please guide how to resolve this
The problem is that you are trying to run the command "who am i" (w
On 10/26/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
> On 10/26/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > I am executing my $usr=qx("who am i"); to get the user id on unix
> > machine but it is giving error. sh: who am i: not found
> >
>
> Oops,it's `whoami` not `who am i
$ who --help
Usage: who [OPTION]... [ FILE | ARG1 ARG2 ]
...
-monly hostname and user associated with stdin
...
If ARG1 ARG2 given, -m presumed: `am i' or `mom likes' are usual.
`who am i` is the same as writing `who -m`
$ whoami --help
..
Same as id -un.
---
Sayed, Irfan (Irfan) wrote:
Jeff Pang wrote:
You're actually executing the `who` command,which just take the `am i`
as its arguments.
The results are the same:
$ who am i
pyh pts/0Oct 26 18:48 (116.21.60.xx)
$ who
pyh pts/0Oct 26 18:48 (116.21.60.xx)
This is `whoami`
ards
Irfan.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Pang
Sent: Friday, October 26, 2007 4:54 PM
To: Beginner
Cc: beginners @ perl. org
Subject: Re: error in qx
On 10/26/07, Beginner <[EMAIL PROTECTED]> wrote:
>
> -bash-3.00$ w
On 10/26/07, Beginner <[EMAIL PROTECTED]> wrote:
>
> -bash-3.00$ who am i
> dpaikkos pts/14 Oct 26 12:16 (host.mydomain.com)
>
> Work for me on a bash shell as does whoami.
No.
You're actually executing the `who` command,which just take the `am i`
as its arguments.
The results are the same
On 26 Oct 2007 at 19:14, Jeff Pang wrote:
> On 10/26/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > I am executing my $usr=qx("who am i"); to get the user id on unix
> > machine but it is giving error. sh: who am i: not found
> >
>
> Oops,it's `whoami` not `who am i` unle
On 10/26/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am executing my $usr=qx("who am i"); to get the user id on unix
> machine but it is giving error. sh: who am i: not found
>
Oops,it's `whoami` not `who am i` unless you have aliased it.
--
To unsubscribe, e-mail: [EMAIL