Re: `whoami`? I think I know, my house is in the meadows though...
From: Moshe Jacobson (bramoshe_at_runslinux.net)
Date: 05/17/05
- Next message: Kenny McCormack: "Re: Any simple way to detect missing EOL on last line of a text file?"
- Previous message: hksionsek_at_c-a-s.de: "tail -f in a script"
- In reply to: DaLoverhino: "`whoami`? I think I know, my house is in the meadows though..."
- Next in thread: Stephane CHAZELAS: "Re: `whoami`? I think I know, my house is in the meadows though..."
- Reply: Stephane CHAZELAS: "Re: `whoami`? I think I know, my house is in the meadows though..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 May 2005 18:35:06 -0400
DaLoverhino <DaLoveRhino@hotmail.com> wrote:
> I have a script that needs to get the username. It's not for security
> purposes, but it is used for a simple sanity check.
> This script needs to work on all flavors of unix and unix shells. I
> want to use whoami, but I am worried that it may not be found on all
> flavors of unix+shells? Is this true? If whoami is not universally
> present in all unix flavors, what command would be?
If your script is in bash, you can use the bash variable $USER.
Moshe
-- *** SPAM BLOCK: Remove bra before replying! *** http://runslinux.net :: moshe at runslinux dot net :: AIM: Jehsom
- Next message: Kenny McCormack: "Re: Any simple way to detect missing EOL on last line of a text file?"
- Previous message: hksionsek_at_c-a-s.de: "tail -f in a script"
- In reply to: DaLoverhino: "`whoami`? I think I know, my house is in the meadows though..."
- Next in thread: Stephane CHAZELAS: "Re: `whoami`? I think I know, my house is in the meadows though..."
- Reply: Stephane CHAZELAS: "Re: `whoami`? I think I know, my house is in the meadows though..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|