使用for循环在/bbbb目录下批量创建10个html文件,其中每个文件需要包含10个随机小写字母加固定字符串bbbb:

vim shell.sh

	mkdir /bbbb
	cd /bbbb
	for i in `seq 1 10`
	do
		touch bbbb$i.html
		uuidgen | tr -dc 'a-z | cut -c 1-10 > bbbb$i.html  #生成随机字符串
	done

猜你喜欢

转载自blog.csdn.net/zhangthree1/article/details/109081752