简单脚本,判断用户名和组名是否相等
#!/bin/bash if [ $1 == `id -n -g $1` ]; then echo "same" else echo "not same" fi
id -n name 显示的名字,而不是数字
We only live once, and time just goes by.
#!/bin/bash if [ $1 == `id -n -g $1` ]; then echo "same" else echo "not same" fi
id -n name 显示的名字,而不是数字