#!/bin/bashfunction vdecode { echo " " echo "Encoding in progress please wait" echo " " mencoder $selectedfile -ovc xvid -xvidencopts bitrate=1600 -oac mp3lame -o $decodedfile.avi > /dev/null 2> /dev/null if [ $? == 1 ]; then echo "Process cannot be completed :(" else echo "Process succesfuly completed =D>" echo " " fi }ures_fajl=""ures_nev=""read -p "Do you wish to list your current folder for video files? (yes/no) " listif [ $list == yes ] || [ $list == no ]; #if1 then if [ $list == yes ]; #if2 then ls -l | grep *.3gp ls -l | grep *.ogg read -p "Which file do you wish to decode? " selectedfilevdecode else read -p "Which file do you wish to decode? " selectedfile#vdecode if [ $selectedfile == $uresfile ]; #if3 then echo "Cannot decode "nothing"" exit else [ $selectedfile == $selectedfile ] read -p "Do you wish to rename the output file? (if not the name won't change) " decodedfile if [ $decodedfile == $ures_nev ]; #if4 then [ $decodedfile == $selectedfile ] else [ $decodedfile == $decodedfile ] echo "The output file will be renamed to $decodedfile.avi "vdecode exit fi #if4 fi #if3 #else echo "Ok so you don't wish to list"vdecode fi #if2#else#echo "Ok this means that you don't really want to decode at all :P"fi #if1