Add an older tool I wrote ages ago.

This commit is contained in:
Mid Favila 2021-06-30 00:43:11 -03:00
parent eba7f75033
commit 81c7cefc9e
2 changed files with 24 additions and 0 deletions

1
README
View File

@ -11,3 +11,4 @@ msc - short script to auto-resize mandoc output
modem-manager - used to manage laptop PCIe WAN modems. rather dense modem-manager - used to manage laptop PCIe WAN modems. rather dense
netsh - an old experiment that serves as a simple TUI for managing network interfaces... and an example of how not to use AWK netsh - an old experiment that serves as a simple TUI for managing network interfaces... and an example of how not to use AWK
plumber - one of my more sophisticated scripts; plumber creates pipes between programs based on what sort of input it receives, and handles errors (somewhat) intelligently plumber - one of my more sophisticated scripts; plumber creates pipes between programs based on what sort of input it receives, and handles errors (somewhat) intelligently
bach - the Batch Audio Conversion Helper uses FFMPEG to convert large numbers of files at once

23
bach Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh -e
if [ $# -le 1 ]
then
printf "This script will take two variables and convert all audio files of the first format to the second, using ffmpeg. \n"
elif [ $# -ge 3 ]
then
printf "You've entered too many variables. We only need two... did you not check the help? \n"
else
i=`ls | grep $1 | wc -l`
p=1
mkdir $2
while [ $p -le $i ]
do
x=`ls | sed "$p!d"`
y=`printf "$x" | sed "s/$1/$2/"`
yes | ffmpeg -i "$x" "$y"
mv "$y" $2/
p=$(( $p + 1 ))
done
fi