Link to home
Start Free TrialLog in
Avatar of k3vsmith
k3vsmith

asked on

Run same command on multiple files in Linux

I copied all files into one directory. I want to run this command against all of them:

tkprof NAMEOFFILE.trc NAMEOFFILE.txt explain=apps/password sort='(prsela,exeela,fchela)'

NAMEOFFILE would be replaced with the file names in the directory on each run.

There are approximately 20 files in this directory.

I can do it manually, but wanted to know if I could just kick off a script or something to do this for me.

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of k3vsmith
k3vsmith

ASKER

Great, thanks! I will try this out and get back to you.
Worked great! thank you. Big time saver