>>What is the difference among:
>>echo $passwd > file
>>command < file
>>echo $passwd | command
>>command << EOF
>>To me they are all equivalent ( I am talking about functionality, not
>>UUOC stuff here ). But the DBA claims that only 1) works for the oracle
>>financial application applmgr, and it beats me. 1) is recommended by oracle
>>on the manual but I prefer 2 and 3. Please shed some light on
>>the issue. Thanks.
>There are several differences that I can think of:
Another is if the program performs ioctls on its input. I was trying to
port an Informix script from SunOS 4.x to Solaris 2.x a year or so ago, and
it was failing on a section of code similar to 2 or 3, with an error like
"Not a tty". It turned out that the "isql" command didn't like taking its
input from a pipe, but when I changed the script to use a temp file it was
happy. Isql tries to determine if it's being run interactively (it puts up
menus in that case) and my guess is that the ioctls it uses to do this
wasn't working as expected in Solaris.
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.