LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

File conversion script

Posted 12-29-2012 at 10:04 AM by Snark1994
Updated 12-29-2012 at 10:10 AM by Snark1994

A handy script I put together to automatically convert between file formats based on file extension, in an easily extensible manner:

Code:
#!/usr/bin/env bash

#Conversion rules:
# commands["extension_from extension_to"]="convert_command"
# INFILE and OUTFILE in the conversion command are replaced
# with the appropriate filenames

declare -A commands
commands["wav mp3"]="ffmpeg -i INFILE OUTFILE"
...
Senior Member
Posted in Uncategorized
Views 1488 Comments 0 Snark1994 is offline

  



All times are GMT -5. The time now is 02:12 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration