写一个函数,输出当前用户的uid和gid,并使用变量接收结果 #!/bin/bash function fun() { echo uid为`id -u` echo gid为`id -g` } id=`fun` echo $id