tcl是否有标准的NSS查找方式(getpwnam,setpwent,...)
答案 0 :(得分:2)
Tcl不公开那些作为API(它内部也没有真正使用它们),但我相信TclX扩展包 支持exactly what you want。例如:
package require TclX
set uid [id convert user $tcl_platform(user)]
puts "Your userid is $uid and you are a member of these groups: [id groups]"
如果您正在使用ActiveTcl,那么您肯定可以使用TclX软件包(已安装或可从茶壶存储库获得)。