![](/img/trans.png)
[英]How to loop through the command for number of files in directory using bash?
[英]Bash: how can I loop through a directory's files?
在Bash中,如果我試圖遍歷目錄中的所有文件並對它們執行命令,則_ in _循環中的_會是什么樣?
for file in *
do
perform_command_on "$file"
done
一個簡單for
for f in dir/*; do echo "Processing $f file.."; done
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.