tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* awk UID filter
@ 2004-07-30 13:08 Selcuk Sahin
  0 siblings, 0 replies; only message in thread
From: Selcuk Sahin @ 2004-07-30 13:08 UTC (permalink / raw)


 
            Hi everybody,
            I wanna filter the User ID (UID) from "/etc/passwd" which is
as everybody know a file as follows:
            .
            evrm4915:7FzjqY2FJ6EMo:272:223:celebi
simsek:/home/aski/evrak:/usr/bin/sh
            evrm4275:unM//s5mugLt2:273:223:celalettin
acil:/home/aski/evrak:/usr/bin/sh
            ..
            
            Well I have written a script using awk. But it didnt work.
My script to fitler the UID is as follows:
 
            echo "Enter the user whose UID youn wanna know : "
            read usrid
            more /etc/passwd | awk -F: '/$usrid/ { print $3 }';;
 
            The above script doesnt work. Can anybody tell me please
which part I am doing wrong?
 
            Greetings
 
            SSS
 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-30 13:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-30 13:08 awk UID filter Selcuk Sahin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox