How can I access the standard-in device in HP-UX? I am trying to automate sftp on an HP-UX system. On solaris I can just do:
sftp -b /dev/fd/0 remotehost <<EOF
cd pub
ascii
get filename.txt
bye
EOF
How can I access the standard-in device in HP-UX? I am trying to automate sftp on an HP-UX system. On solaris I can just do:
sftp -b /dev/fd/0 remotehost <<EOF
cd pub
ascii
get filename.txt
bye
EOF
Unfortunately, you can't do that on HP-UX. I don't know why they don't have an fd filesystem. It's very useful and it wouldn't take long to implement.
As for your problem, store the stuff in a temp file and use the name of the temp file.
Thanks. I wanted to keep it as similar to a regular here doc as possible, but I'll go the way of a temp file.