Doboy
Doboy

Reputation: 11112

how do I do groups for unix commands

I want do something like this:

python *.py > *.std

I tried doing:

python (*).py > \1.std

but that is wrong,

Upvotes: 1

Views: 58

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799310

You don't. You process them in a loop.

for f in *.py
do
  python "$f" > "${f%.py}".std
done

Upvotes: 2

Related Questions