UNIX/コマンド/シェル・シェル組み込み/foreach


Table of Contents
% foreach n ( *.c )
foreach?
foreach? echo $n
foreach? end

% foreach n (*.c)
foreach? echo gcc -o $n:r.o $n
foreach? gcc -o $n:r.o $n
foreach? end
gcc -o sample.o sample.c
gcc -o test.o test.c

% for i in *.jpg
> do
> convert $i ${i%jpg}gif
> done
> echo "convert $i ${i%jpg}gif"


xrea