handbrakecli

Bash script do loop exiting early

我怕爱的太早我们不能终老 提交于 2021-01-29 12:29:45
问题 I am having a frustrating time. I have written a script which should read a file line by line, and do an operation based on that line. Specifically, I'm using handbrake CLI to convert a partial directory (based on a file list) to another smaller format. I've tested the script using "echo"s for the command line to dry run it, but when I want to actually run the script, it only runs the command on the first item in the list, and then exits. Here's the code: #!/bin/bash if [ "$1" != "" ]; then