Re: How to detect user's existence over UNIX
Neo <vikram.sutar@xxxxxxxxx> writes:
Is there any generic way to detect user's existence over RHEL and
Solaris? I want to write a shell script to do so. Thanks.
Leaving issue of non-atomicness aside, you could use the id command
for that. 'id <username>' will return a non-zero exit status the user
does not exist. This is not the only reason which may cause it to
fail, but presumably, the most 'common' one, and it should be able to
deal with things like NIS maps.
.
Relevant Pages
- Re: Newbie help for using multiprocessing and subprocess packages for creating child processes
... the first is the conceptual equivalent of executing the ... The first searches for a command in your PATH named ‘ls /path...’. ... where STANAME is a string 4 characters long. ... firing off my shell script: ... (comp.lang.python) - Re: Newbie help for using multiprocessing and subprocess packages for creating child processes
... The first searches for a command in your PATH named ‘ls /path...’. ... where STANAME is a string 4 characters long. ... firing off my shell script: ... (comp.lang.python) - print subsystem errors
... I have an application that executes a shell script to print jobs. ... I can take the same command issued in the shell script; ... ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ... (AIX-L) - Re: despair
... I once tried to write a cd program in Unix. ... Just putting a cd command in a script and then ... hell are you supposed to write shell script macros to run a frequently ... make "$ FOO BAR" a meaningful DCL command. ... (comp.os.vms) - Re: cron and command quote
... if you are going to be using a shell script you have to make sure that it exits properly. ... So, '||' is just as legal as '&&' and would do just as it does on the command line, assuming of course there is nothing found by the grep. ... with && we have execute command1 if it returns true execute command2 ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ... (Debian-User) |
|