mirror of
https://github.com/Estom/notes.git
synced 2026-02-03 18:44:19 +08:00
15 lines
264 B
Bash
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
|