自分のディレクトリに移動
#!/bin/sh
cd `dirname $0`
list.txtを一行づつ読み込んでループ
filename="list.txt"
cat ${filename} | while read -r line
do
echo $line
done
ワイルドカードで検索したファイルリストをループ
files="*.txt"
for filepath in ${files}
do
echo $filepath
done
More than 5 years have passed since last update.
#!/bin/sh
cd `dirname $0`
filename="list.txt"
cat ${filename} | while read -r line
do
echo $line
done
files="*.txt"
for filepath in ${files}
do
echo $filepath
done
Register as a new user and use Qiita more conveniently