shell脚本查找当前目录的文件文件名可能有空格并打印出来加上my字符写入到文件中
#!/bin/bash for file in * do if [ -f "$file" ]; then echo "my$file" >> output.txt fi done echo "Done"
原文地址: https://www.cveoy.top/t/topic/fr5H 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
#!/bin/bash for file in * do if [ -f "$file" ]; then echo "my$file" >> output.txt fi done echo "Done"
原文地址: https://www.cveoy.top/t/topic/fr5H 著作权归作者所有。请勿转载和采集!