Search code examples
fish

Fish shell run a command with parenthesis in arguments


I am attempting to run the command

ffmpeg -i in.mp4 -vf yadif,format=yuv420p -force_key_frames expr:gte(t\,n_forced/2) -c:v libx264 -crf 18 -bf 2 -c:a aac -q:a 1 -ac 2 -ar 48000 -use_editlist 0 -movflags +faststart out.mp4

as mentioned here. However, the issue is the argument expr:gte(t\,n_forced/2) contains parenthesis and fish shell will interpret t\,n_forced/2 as a commmand. Is there any way to run this in fish shell instead of needing to make a seperate bash script?

Note, I cannot wrap with single quotes as I get the following Missing ')' or too many args in 'gte(t\,n_forced/2)'


Solution

  • Surrounding the argument expr:gte(t\,n_forced/2) in single quotes and removing the backslash in \, fixed the problem.

    The resulting argument is 'expr:gte(t\n_forced/2)'.