in reply to Help with error msg "Useless use..."

My bad... I should have posted the entire error message. Sorry about that. Also, I appreciate everyone taking the time to explain why it wasn't working. I love this place!

dbwiz is correct; the original program snippet I snatched from a reply Ovid made to someone only had the print command; I added the rest to get it to a file. I also got the command line to show me the diagnostics I wanted. Thanks!

I changed my program as indicated, and it eliminates the error message, and I still get my expected output. Thanks to all of you for explaining, parsing, the Unix lesson, etc.!