代码为:
1 #!/bin/bash
2
3 read -p "dirname:" a
4 read -p "make dir now?[y/n]:" select
5 read select
6 if [ $select = "y" ]
7 then
8 mkdir $a
9 else
10 echo nothing to do;
11 fi
#!/bin/bash
echo "pls input directory"
read a
mkdir $a