From ea37fdbf7acee96f07dd709b2cbf545dd9b42a50 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 2 Feb 2013 14:35:12 +0100 Subject: cutint: Do not use arrays but a string to store tmp files --- src/cutint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cutint.sh b/src/cutint.sh index ce53e99..0157dc4 100755 --- a/src/cutint.sh +++ b/src/cutint.sh @@ -1,6 +1,6 @@ #!/bin/sh -parts=( ) +parts="" if [ $# -lt 5 ]; then printf "usage: %s input output [start duration [start duration ...]]\n" $0 2>&1 @@ -19,11 +19,11 @@ do echo $tmp ffmpeg -y -i "$input" -sameq -ss "$1" -t "$2" "$tmp" - parts=( $parts $tmp ) + parts=$(printf "%s|%s" "$parts" "$tmp") shift shift done -ffmpeg -y -i concat:$(printf "|%s" "${parts[@]}" | sed 's/^|//') -vcodec copy -acodec copy "$output" -rm "${parts[@]}" +ffmpeg -y -i concat:$(echo "$parts" | sed 's/^|//') -vcodec copy -acodec copy "$output" +rm $(echo $parts | sed 's/|/ /g') -- cgit