そーす------------------ #!/bin/csh set dir = /home/r_suga/shell/ set file1 = $dir"aaa.txt" set logfile = $dir"aaa.log" while 1 if [ -f $file1 ] then sleep 10 echo "`date`:$file1 ファイルは存在しています。" >> $logfile else sleep 10 echo "`date`:$file1 ファイルが存在しません。" >> $logfile endif end ------------------
$ cat a.txt|while read HOGE; do ls $HOGE; done ls: ~/a: No such file or directory ls: ~/b: No such file or directory ls: ~/c: No such file or directory