#!/bin/bash if [ "$#" -ne 3 ]; then echo "USAGE: $0 FILE START END" exit 1 fi cutFile="$(cutVideo "$1" "$2" "$3")" echo "cutFile=$cutFile" status=$? if [ $status -eq 0 ]; then echo "$(shrinkVideo "$cutFile")" status=$? if [ $status -eq 0 ]; then rm "$cutFile" fi fi