Files
notes_estom/Linux/shell/test04.sh
法然 dd11a44b1f shell
2022-10-03 00:08:52 +08:00

15 lines
264 B
Bash

[root@localhost ~]$ vi sh/add_dir.sh
#!/bin/bash
#创建目录,判断是否存在,存在就结束,反之创建
echo "当前脚本名称为$0"
if [ $1 -eq 1 ]
then
echo 'this is 1'
elif [ $1 -eq 2 ]
then
echo 'this is 2'
else
echo 'this is else'
fi