awk UID filter
From: Selcuk Sahin (selcuk.sahin_at_aski.gov.tr)
Date: 07/30/04
- Previous message: Monostori Krisztian: "Most editor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jul 2004 16:08:35 +0300 To: tru64-unix-managers@ornl.gov
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
- Previous message: Monostori Krisztian: "Most editor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]