Last active
April 20, 2018 14:33
-
-
Save yuba/d3500285422f539c8ada5292400593d1 to your computer and use it in GitHub Desktop.
ディレクトリ内のすべてのファイルをループする ref: https://qiita.com/yuba/items/489fadb350246b5c94e7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while read -d $'\0' file; do | |
"${file}" に対して処理 | |
done < <(find ディレクトリ -mindepth 1 -maxdepth 1 -print0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while read file; do | |
"ディレクトリ/${file}" に対して処理 | |
done < <(ls -A -1 ディレクトリ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while read -d $'\0' file; do | |
"${file}" に対して処理 | |
done < <(find ディレクトリ -mindepth 1 -maxdepth 1 -print0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment