1

I would like to create a temporary shell script, and pass it as a parameter to another script, i.e. a callback hook. Is it possible to use process substitution for that?

In this example, aria2c allows a hook as a parameter. aria2c will call that hook with a few parameters once the page is downloaded. Ideally, I would like aria2c to call my "virtual" script, without first making any temp files, like so:

aria2c \
  --on-download-complete <(echo '#!/bin/sh'; echo 'echo "Called with [$1] [$2] [$3]"') \
  https://aria2.github.io/

but as a result i get a permissioning error:

Could not execute user command: /dev/fd/63: Permission denied
4

1 に答える 1