0

I have problem: I creating text file info, with same name like mp3 with this:

for f in *.mp3; do id3v2 -l "$f" > "${f%mp3}txt"; done

It give me for every file.mp3 > file.txt with info about mp3 in curent directory.

How can I do same thing with subdirectories?

1 Answer 1

0

it's easy; just enable recursive globbing **:

shopt -s globstar ## enable recursive globbing operator **
for f in **/*.mp3; do id3v2 -l "${f}" > "${f%mp3}txt"; done
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.