[project @ 1996-07-25 21:02:03 by partain]
[nofib.git] / GHC_ONLY / po010 / Main.hs
1 import Posix
2
3 main =
4 getUserEntryForName "mattson" >>= \ mattson ->
5 getUserEntryForName "partain" >>= \ partain ->
6 putStr (ue2String mattson) >>
7 putChar '\n' >>
8 putStr (ue2String partain) >>
9 putChar '\n' >>
10 getUserEntryForID (userID mattson) >>= \ muid ->
11 getUserEntryForID (userID partain) >>= \ puid ->
12 putStr (ue2String muid) >>
13 putChar '\n' >>
14 putStr (ue2String puid) >>
15 putChar '\n'
16
17 ue2String ue =
18 name ++ (':' : (show uid) ++ (':' : (show gid) ++ (':' : home ++ (':' : shell))))
19 where
20 name = userName ue
21 uid = userID ue
22 gid = userGroupID ue
23 home = homeDirectory ue
24 shell = userShell ue