Hello Alex,
I use the following in a shell script of mine:
#!/bin/bash
run_lftp()
{
[ -z "${TARGET}" ] && return;
[ -z "${OPERATION}" ] && return;
lftp <<EOF 2> /dev/null
# debug 3;
set dns:fatal-timeout 30;
set net:timeout 30;
set net:max-retries 1;
set cmd:fail-exit true;
open ${TARGET};
${OPERATION};
EOF
}
TARGET="http://www.opensolaris.org/"; OPERATION="cat /"; run_lftp | ...
However when I set "set cmd:fail-exit true;" a redirections leads to no
output. If I comment this line out everything is fine. Is this the
intended behaviour or a bug?
for
TARGET="http://fabrice.bellard.free.fr/qemu/"; OPERATION="cat
index.html"; run_lftp | ...
it works for example.
Thomas