Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: barth.e.weishoff@cummins.com (Barth Weishoff)
Subject: /dev/stdin ....  ?
Date: 22 Dec 2003 11:47:39 -0800	[thread overview]
Message-ID: <efbd1d5e.0312221147.57aecc0@posting.google.com> (raw)

Hello group,

  I've run this by HP, and they can't seem to come up with a clear
answer.   Anyway, long story short, I've been using here documents
with OpenSSH's SFTP program to transfer files among hosts.  Example
(stolen from http://www.snailbook.com/faq/scripting-sftp.auto.html )

   #!/bin/sh
  echo "OK, starting now..."
  sftp -b /dev/stdin remotehost <<EOF
  cd pub
  ...


That works *great* on Solaris, Linux and FreeBSD.   However, it
doesn't work at all on any version of Tru64 unix.  /dev/stdin doesn't
exist, and I'm not sure what to substitute on a Tru64 box in order to
make this work.   I have tried:

 sftp -b `tty` somehost <<HEREDOC

but to no avail.  

I've looked at the /dev/stdin on a typical linux box;

[cj037@stotslin1 fd]$ ls -l /dev/stdin
lrwxrwxrwx    1 root     root           17 Jul 10 09:51 /dev/stdin -> 
  ../proc/self/fd/0

As you can see, it's just a link to /proc/self/fd/0 which is in turn
linked to the current tty

lrwx------    1 cj037    cj037          64 Dec 22 13:44 0 ->
/dev/pts/2

Which is why I attempted to use `tty` in tandem with the -b option in
SFTP.

Does anyone have any idea how to accomplish this under Tru64?  Thanks!

-BW


             reply	other threads:[~2003-12-22 19:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-22 19:47 Barth Weishoff [this message]
2003-12-22 21:30 ` /dev/stdin .... ? Peter da Silva
2003-12-23  4:23   ` Finnbarr P. Murphy
2003-12-22 21:32 ` Spider Boardman
2003-12-23  2:47   ` Barth Weishoff
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox