[FFmpeg-user] ffmpeg -i "`rm -rf /???`" ?

Gyan Doshi ffmpeg at gyani.pro
Tue Mar 10 08:09:58 EET 2020



On 10-03-2020 10:16 am, Mark Filipak wrote:
> UPDATE
> Well, it looks like this is a unix command -- ffmpeg can run 
> commands,eh? -- to silently delete all files and directories.

Before ffmpeg receives the command arguments, the tokens are parsed by 
the shell.  Nicolas enclosed the rm invocation in backticks, so the 
shell executes it as a command  and substitutes its exit code as the 
token passed on to ffmpeg. Use of ffmpeg here is incidental - this can 
be done with any other program invocation through such a shell.

See 
http://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html

Gyan


More information about the ffmpeg-user mailing list