in reply to Re^4: Finding a Letter at Last line
in thread Finding a Letter at Last line

Almost there, just insert two extra quotes.
for file in `ls -1 *.txt` do perl -e 'open FILE, "<'$file'"; $_ = join "", <FILE>; print "true" +if /^t[^\n]*\Z/msi' done

Replies are listed 'Best First'.
Re^6: Finding a Letter at Last line
by smokemachine (Hermit) on Nov 08, 2006 at 17:05 UTC
    you can do this too... but you dont need use the ls insight of for...
    for file in *.txt do perl -e 'open FILE, "<'$file'"; $_ = join "", <FILE>; print "true" +if /^t[^\n]*\Z/msi' done
      Hi smokemachine
      excellent...thanks many..you saved my day...thanks again for the quick help
      Thanks & Regards
      Sridhar