From 4504c6b802edf6c8abb8fc61becc6fdb3c071eea Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sat, 4 Feb 2023 21:17:21 +0600 Subject: Fix: add var (source file) to awk --- cut_by_vtt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cut_by_vtt.sh b/cut_by_vtt.sh index d85743f..a4576a2 100755 --- a/cut_by_vtt.sh +++ b/cut_by_vtt.sh @@ -6,7 +6,7 @@ filename=${1:-} audioname=$(printf "$filename" | sed "s/\(.*\).vtt/\1/") # given vtt what is original ext? -ffmpeg_commands=$(grep "\-->" $filename | awk -F " " '{print "ffmpeg -i "$audioname" -ss " $1 " -to " $3 " -vn -acodec copy " NR ".ogg"}') +ffmpeg_commands=$(grep "\-->" $filename | awk -F " " -v aname="$audioname" '{print "ffmpeg -i "aname" -ss " $1 " -to " $3 " -vn -acodec copy " NR ".ogg"}') while read cline; do -- cgit v1.2.3