shell判断一个变量是否为空方法总结 https://www.jb51.net/article/154835.htm 1.判断变量 复制代码代码如下: read -p "input a word :" wordif [ ! -n "$word" ] ;then echo "you have not input a word!"else echo "the word you input is $word"fi 2
1. 更友好的显示当前挂载的文件系统 mount | column -t 这条命令适用于任何文件系统,column 用于把输出结果进行列表格式化操作,这里最主要的目的是让大家熟悉一下 columnt 的用法. 下面是单单使用 mount 命令的结果: $ mount /dev/root on / type ext3 (rw) /proc on /proc type proc (rw) /dev/mapper/lvmraid-home on /home type ext3 (rw,noatime)