我如何编写一个Bash脚本,它将选择~/test
所有带有.css
扩展名的文件,因此我可以将它们一个接一个地.css
给其他操作?
#!/bin/bash
for f in ~/test/*.css
do
# your command 'cmd'
cmd "$f"
done
To process a command for every .css
files in one line, try like this:
find ~/test -type f -name '*.css' -execdir cmd {} \+
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.