> /dev/null
egrep "$group" /etc/group > /dev/null
把运行命令 egrep "$group" /etc/group
的过程转向到 /dev/null 中,/dev/null就是无底洞的意思,意思就是说,命令执行的过程不想看到,所以就丢这里了。
-
字符串合并
${}${}
group=$1 str="_new" group_new=${group}${str}
-
shell -z string
string的长度为零则为真errorstatus="notnull" if [ !-z $errorstatus ] then echo "string is not null" fi