Shell获取当前用户

id | sed -e 's/).*//g' -e 's/.*(//'

 

比$LOGNAME $NAME who am i都要准确一些

posted @ 2013-12-25 11:47  鸪斑兔  阅读(323)  评论(0编辑  收藏  举报