shell while, for
file manipulation with file list
# list=$(ls -tr /test/log/testjob*.log)
# for each in $list; do echo $each; done
test/log/testjob_20191206-023105.log
test/log/testjob_20191207-015901.log
# ls -tr /test/log/testjob*.log >log.lst
# while read each; do echo $each; done <log.lst
test/log/testjob_20191206-023105.log
test/log/testjob_20191207-015901.log
コメント
コメントを投稿