linux 脚本题
在这里插入图片描述脚本 任务描述:请采用 shell 脚本,实现快速批量的操作。 (1)在 linux7 上编写 /root/createfile.sh 的 shell 脚本,请使用两位十六进制的方式在 /root/shell 下创建 16 个文件,文件命名为 testXX.txt,其中 XX 为 00、01、02、03、10、11、12、13、20……32、33。如果文件存在,则删除再创建;每个文件的内容同主文件名,如 test00.txt 文件的内容为“test00”。用 /root/createfile.sh 命令测试。
#!/bin/bash
dir=“/root/shell”
if [ ! -d “ d i r " ] ; t