About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/username.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 username Context: varmm

Synopsis

Returns the login name of the owner of the current process.

Syntax

String_Type username

Description

This S-Lang function returns the user name of the owner of the current process. Since the function does not take any arguments it does not need to be called as "username()".

Example 1

chips> vmessage("The username is %s",username)
The username is ciaouser
chips> !who am i
ciaouser pts/1 Jun 18 21:00 (chandra.cfa.harvard.edu)

Here we show username() being called from ChIPS.

Example 2

require("varmm");
vmessage("The username is %s",username);
() = system("who am i");

This is the same as the previous example but written as a S-Lang script. If save to the file uname.sl then it can be run using:

  unix% slsh uname.sl

and should produce the same output (bar differences in the time) to the ChIPS version. Note that the syntax and output of the UNIX "who" command is system specific - we have used the Solaris 2.8 version in these examples.

Bugs

See the bugs page for the Varmm library on the CIAO website for an up-to-date listing of known bugs.

See Also

modules
varmm
varmm
__exit
Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.