shell批量新建文件,文件名依次为a1,a2……a100
#!/bin/bash
Path=/home/yifan/maying/shell/case2
[ -d $Path ] || mkdir $Path
int=1
while(($int<=100))
do
filename="a"$int""
touch $Path/$filename
let "int++"
done
结果:
shell批量新建文件,文件名依次为a1,a2……a100
#!/bin/bash
Path=/home/yifan/maying/shell/case2
[ -d $Path ] || mkdir $Path
int=1
while(($int<=100))
do
filename="a"$int""
touch $Path/$filename
let "int++"
done
结果: