running topasout on multiple files and creating new files with a .out extension

What would be a command or script to select all the *.topas files, run this command on them: topasout -R detailed -i 5 *.topas and create new files with the same name as the .topas files only with .out at the end of the filename instead of .topas.

Example:

topasout -R detailed -i 5 servername_cec_100324.topas > servername_cec_100324.out
topasout -R detailed -i 5 servername_cec_100325.topas > servername_cec_100325.out
topasout -R detailed -i 5 servername_cec_100326.topas > servername_cec_100326.out

So, iinstead of doing those commands manually, one by one, would it be possible to select all the .topas files, run that command on them and create new .out files with the same name as the .topas files only with .out instead of .topas at the end?
murkytunaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Hi,
ls *.topas | while read file
  do
    topasout -R detailed -i 5 $file > ${file%".topas}.out
  done
wmp
0
woolmilkporcCommented:
... sorry, missed one double quote following topas -
ls *.topas | while read file
  do
    topasout -R detailed -i 5 $file > ${file%".topas"}.out
  done  
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
murkytunaAuthor Commented:
Whew.  Thanks much!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.