Skip to main content

Thread: Command Line: how to sort find results alphabetically?


hi,

re-encode media files mp3 64 kbps bitrate using ffmpeg. work need done entire folder generate syntax automatically. example folder has following content:

01 - mytrack.mp3
02 - mytrack.mp3
03 - mytrack.mp3
etc.

syntax convert 1 file is:

ffmpeg -i "01 - mytrack.mp3" -acodec libmp3lame -ab 64k "br64k/01 - mytrack.mp3"


generate syntax entire folder, use command:

find . -iname "*.mp3" -printf "ffmpeg -i \"%f\" -acodec libmp3lame -ab 64k \"br64k/%f\"\n" > reencodebitrate.sh

result ok , reencodebitrate.sh works expected. however, make script more readable having lines displayed in script sorted alphabetically. because looks there no apparent order.

question: there way sort find output? , better yet, can apply improve command line above? or may there more elegant solution using command find?

in advance help.

not tested...
code:
for f in "*.mp3"; ffmpeg -i "$f" -acodec libmp3lame -ab 64k "br64k/$f"; done


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] Command Line: how to sort find results alphabetically?


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support