shell脚本依序创建10个文本

脚本如下:

#!/bin/bash

cd /tmp/

mkdir shell_tut
cd shell_tut
for ((i=0; i<10; i++)); do
   touch test_$i.txt
done

执行结果:

猜你喜欢

转载自blog.csdn.net/kevinsingapore/article/details/89818627