1

I'm working on porting this bash script over to Linux from HP-UX. There appears to be a command

remsh opcfdp01 "find  ${TOOLS_DIR} -user ${ADMIN_USER} -exec chmod a+rwx {} \;"  < /dev/echo > /dev/null 2>&1

The device file /dev/echo appears to print the output on HP-UX; however, no such file seems to exist in Linux.

I was wondering how I could go about creating a /dev/echo in Linux.

Michael Hoffman
  • 32,526
  • 7
  • 64
  • 86
Justin
  • 742
  • 5
  • 17
  • 34
  • The example you posted makes very little sense. Can you provide some context as to what you are trying to actually do with it? Like a use case maybe. – Wug Jun 20 '12 at 15:19
  • Could you explain what `/dev/echo` does? I can't find any understandable info on this. It "prints the output" of what? – ormaaj Jun 20 '12 at 15:20
  • @ormaaj: I think what it does is print the output from any command to the device file /dev/echo and then echo it back to stdout. – Justin Jun 20 '12 at 15:26
  • 1
    The most simliar thing you can use is a named pipe. Just do a `mkpipe`. It do have some different, you have to check the blocking status. – J-16 SDiZ Jun 20 '12 at 15:32

1 Answers1

1

The remsh command is like "rsh". It is executing a find command on the remote host 'opcfdp01'. The command line you posted has remsh getting its stdin from /dev/echo, which I believe you should not require.

As far as I was aware, the /dev/echo device is only used by strvf in HP/UX.

There is also some discussion on this at openss7.org

You may be able to get away with simple removing the < /dev/echo part of the commandline altogether, especially if you don't know whether you're using strvf and you're changing your script to use ssh instead of remsh.

ghoti
  • 45,319
  • 8
  • 65
  • 104