diff --git a/wiki/Example_script.wiki b/wiki/Example_script.wiki new file mode 100644 index 0000000..4a990aa --- /dev/null +++ b/wiki/Example_script.wiki @@ -0,0 +1,24 @@ +#summary script showing usage of PPSS variables + +{{{ +#!/usr/bin/env bash + +SRC="$1" +DEST="$2" + + +TYPE=`file -b "$SRC"` +RES=`echo "$TYPE" | grep "WAVE audio"` +if [ ! "$?" == "0" ] +then + echo "File $FILE is not a wav file..." + echo "Type is $TYPE" + exit 0 +fi + +BASENAME=`basename "$SRC"` +MP3FILE="`echo ${BASENAME%wav}mp3`" +lame --quiet --preset insane "$SRC" "$DEST/$MP3FILE" +exit "$?" + +}}} \ No newline at end of file