Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- mkv=$1
- if [[ ! -e $mkv ]]; then
- echo -e "No such file or directory.\n";
- exit;
- elif [[ $mkv == `echo $mkv | egrep "/"` ]]; then
- parsed_name=$(echo $mkv | awk '{gsub(/\//, " "); print $NF}');
- parsed_path=$(echo $mkv | sed 's/\(\/.*\/\)\(.*$\)/\1/g');
- avconv -i ${parsed_path}$parsed_name -c:a copy -c:v copy ${parsed_path}${parsed_name}.avi;
- else
- avconv -i $mkv -c:a copy -c:v copy ${mkv}.avi;
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement