Skip to content

Commit

Permalink
added comments, cleaned up old debug stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
eljeff committed Jul 15, 2015
1 parent 8a0db91 commit fa6ab9d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions soxbatch
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,27 @@ if [ -z "$3" ] ; then
echo "WARNING: No sox options provided"
fi

#FILES="%q\n" "$(pwd)/$1"
FILES="$(pwd)/$1"

echo "files is: " $FILES
echo ""
echo "" # give me some space

# originally used a FILES variable
# FILES="$(pwd)/$1"
# for f in *$1 #$FILES
COUNT=1;

COUNT=1; # start a counter
find . -iname "$1" | while read f
do
echo "File# $COUNT";
FILENAME=$(basename "$f"); #echo "filename is: $FILENAME";
BASENAME=${FILENAME%.*}; #echo "basename is: $BASENAME";
EXT="${FILENAME##*.}"
CONVERTCODE="sox \"$BASENAME.$EXT\" $3 \"$BASENAME.$2\" -S -V2"
echo "Convert code:" $CONVERTCODE
echo "Convert code:" $CONVERTCODE # just print out the code that will run
echo "";
if [ "$4" ] ; then
echo $CONVERTCODE | /bin/bash
echo $CONVERTCODE | /bin/bash # actually run the code if switch is present
fi
COUNT=$((COUNT+1));
COUNT=$((COUNT+1)); # increment counter
done
echo ""
if [ -z "$4" ] ; then
Expand Down

0 comments on commit fa6ab9d

Please sign in to comment.