Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

well pretty much it's in the title.

I've a interactive command. This one ask for a password through /dev/tty. I use this command within a shell script. So the command should read the information through stdin. I've explored some ways to do this:

  • Seek for an option to force stdin (à la ssh with the -T option)
  • The easy ones, stream redirections
  • The coprocesses (|&) to setup a communication between the current script and the coprocessed command
  • I've tried named pipes

I'm running this script in a Korn shell (AIX). I can't use external tools such as expect or empty neither.

Do you have any clues ?

share|improve this question
    
What is the command? Why can't you use expect (which was written explicitly to solve this sort of problem)? –  larsks May 26 '12 at 0:42
    
"can't use external tools such as expect" FRIED. Have fun. –  Ignacio Vazquez-Abrams May 26 '12 at 0:57
    
FRIED? Now I'm hungry... –  larsks May 26 '12 at 1:36
    
I can use expect because I can't install anything on the machines. The command is this one: super version 3.6 so I don't have -S option. –  Daniel May 26 '12 at 12:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.