As a matter of example : this scripts "rewrites" its final command depending on optional arguments. Its purpose is to restore select parts of the environment variables, uid/gid and working directory, that were saved in a directory at some point in the past.

Maybe it is pushing execline a bit too far but I didn't fell like coding it in C (which I do no master).

Le 07/06/2018 à 17:59, Profpatsch a écrit :
Laurent Bercot writes:

  Remember that once an execlineb script has been parsed, it's just a
command line, no more, no less. So your example script can just be
written as:

define url
s6-tcpclient $url 80
foreground { fdmove 1 7 echo -en "..." }
fdmove 0 6 cat

  No second execlineb invocation necessary at all. No quoting
Ooooooh, you are right!
It’s even more elegant than I thought!

Reply via email to