Hi Michael,
replacing EOF delimiter by a md5sum works well.
The process substitution works only for real bash shells, or zsh.
It does not work with sh or busybox.
So I think we have two solutions here:
- Support multiple methods, chosen by user configuration:
-> bash -c "cmd" which doesn't support very long commands
-> bash <<EOF which doesn't support stdin
-> bash <(cat <<EOF) which supports all but which doesn't works on basic shells like sh or busybox (works with bash and zsh)
- Reproduce method 3 by writting commands in a target's temporary file, launch the shell with this file in argument, and finally remove the file from the target.
The last solution have the major drawback to execute extra commands each time and to have a writable filesystem usable on the target
Cheers,
--
Sylvain