diff options
author | Grail Finder <wohilas@gmail.com> | 2023-02-04 21:17:21 +0600 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2023-02-04 21:17:21 +0600 |
commit | 4504c6b802edf6c8abb8fc61becc6fdb3c071eea (patch) | |
tree | 309bdc7ee20c042fa0d84e36eac5d347d6a0eac8 | |
parent | 9d115d1f90e2f201aa674f82701825bcc3cd3ecf (diff) |
Fix: add var (source file) to awk
-rwxr-xr-x | cut_by_vtt.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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 |