id | sed -e 's/).*//g' -e 's/.*(//' 比$LOGNAME $NAME who am i都要准确一些 转载于:https://www.cnblogs.com/tuzkee/p/3490340.html