in reply to Passing password with command

Maybe the command doesn't accept input through stdin. If this is a unix-ish system and something like this the following doesn't work from the command line, then look into Expect or the command line expect:
command <<EOT pwd1 pwd2 EOT
Updated wording.

Update: Original post has been updated so this and any other answers no longer make any sense. Bad OP. Bad, bad OP. BTW, The 'EOT' thing is a "here doc" and is generally a unix concept (though there is the same sort of thing from within perl).

Replies are listed 'Best First'.
Re^2: Passing password with command
by bruceb3 (Pilgrim) on Sep 14, 2007 at 21:47 UTC
    Using a here document means that the input is being read from STDIN, which isn't what is needed.
      Maybe what I wrote is confusing...I said (or tried to say) to try a here document, and if it doesn't work, then the command does not read from STDIN, and then go look into expect.