Yep, tried that one as well. The behavior is identical to
ndsbackup cf /data/bak/`date +%y%m%d` -a adminnamehere <<EOF
passwordhere
EOF
I get the password: prompt in the shell from which the script was executed.
The ndsbackup utility is interactive. It allows the name of an administrative NDS user to be specified on the command line but does not allow for a password to be passed on the command line.
After starting it prompts for password: and waits for response.
The expect/send trick would work if...
I recall seeing EXPECT/SEND used in uucp scripts for midem control.
I thought EXPECT/SEND were internals to the uucp process.
If they are not then can you provide a simple example of how to use them in a ksh script?
Ben
I am writting a script (ksh) to fire off a backup utility nightly. The utility prompts for a password when it runs.
I have tried the following method that works for ftp.
#!/bin/ksh
ndsbackup cf /data/bak/`date +%y%m%d` -a adminnamehere <<EOF
echo "passwordhere"
EOF
I have also...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.