file - 'Do While' loop does not generate new timestamp based values inside it -


consider while loop

find  $filepath  -iname  "$var*" | < commands >  while read filename; logfile=$var/$var1/$filename_"`date +%y%m%d_%h_%m_%s`".log echo "<a long command > > $logfile" >> commandfile.ksh done 

so every iteration of $file should generate new value want a new timestamp every instance of file comes in when see generated ksh file -the $logfile set same value

am missing here. don't want have logfile calculation inside echo because there's lot of escaping , confusion. if every file should generate time-stamp based value , values should not same ..right ? expect 1 iteration @ least 1 s apart. if in comments maybe

find  $filepath  -iname  "$var*" | < commands >  while read filename; sleep 1 logfile=$var/$var1/$filename_"`date +%y%m%d_%h_%m_%s`".log echo "<a long command > > $logfile" >> commandfile.ksh done 


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -