お品書き |
- Ajax
- Tips
- PHP
- SQL Server
- Linux/Shell
- Google
- VBScript
|
|
|
|
shell ループで全てのファイル名を表示
特定にディレクトリのファイル一つ一つに対して、処理したい時に便利です。
ディレクトリに移動して、ファイルごとに処理を行います。
for file in * の部分の*をls等に変えると応用範囲は広がります。
function MyFunction {
cd $1
for file in *
do
echo $file
#some process
done
}
|
|
|
|
Copyright © 2005 開発者のつぼ |
|
|