stdin device on HP


 
Thread Tools Search this Thread
Operating Systems HP-UX stdin device on HP
# 1  
Old 04-21-2005
stdin device on HP

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:

Code:
sftp -b /dev/fd/0 remotehost <<EOF
  cd pub
  ascii
  get filename.txt
  bye
  EOF

# 2  
Old 04-21-2005
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.
# 3  
Old 04-21-2005
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. HP-UX

Failed to open tape device /dev/rmt/0mn:Device busy (errno = 16)

Hi, Unable to make tape backup, please help. /opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00 * Creating local directories for configuration files and archive. ======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery. (Mon... (4 Replies)
Discussion started by: anuragr
4 Replies

2. Red Hat

Unable To Activate Ethernet Network Device in RHEL 5.5 - e100 device eth0 does not seem to be presen

Hi All, Could anyone please help to resolve the below problem. I installed RHEL5.5 in my desktop.But when i try to activate the ethernet connection then it gives me the error. I spent 2 days for the above and go through with several suggestion found by googling. But no luck. ... (0 Replies)
Discussion started by: Tanmoy
0 Replies

3. Solaris

Migrating non DID device in a metaset to DID device

One of my team colleague mistakenly added non DID device to a metaset in a cluster node and inturn it is again added to concat . In that metaset all devices are DID devices except only one . is it possible to convert this non DID device in metaset to DID device without recreating the whole... (0 Replies)
Discussion started by: sekarsamy
0 Replies

4. AIX

How to find all device on p570 when need do device firmware upgrade?

I need upgrade firmware for the device of p570, when I go to IBM FIX download website, there are a lot of device of p570 listed. How can I know what device I have on my p570? (4 Replies)
Discussion started by: rainbow_bean
4 Replies

5. UNIX for Dummies Questions & Answers

How to write to stdin of another program (program A -> [stdin]program B)

Hi, Program A: uses pipe() I am able to read the stdout of PROGAM B (stdout got through system() command) into PROGRAM A using: * child -> dup2(fd, STDOUT_FILENO); -> execl("/path/PROGRAM B", "PROGRAM B", NULL); * parent -> char line; -> read(fd, line, 100); Question: ---------... (3 Replies)
Discussion started by: vvaidyan
3 Replies
Login or Register to Ask a Question