EOF use

Hi,

I'd like to access a windows directory from aix with samba client.
To allow direct access (not interactive), i'm using EOF like:

smbclient \\\\winserver\\windir 'passwd' -U usersmb << EOF
cd subwindir
put myfile
EOF

The access is correct but does somebody know how to trap errors beneath EOF prompt (cd ... ? put ... ??) ?

Thank for your help.

You can't. You're simply sending a stream of input to the process. You won't be able to act on any output or error messages until after the second "EOF" marker.