Check into the -c option for smbclient as I have successfully used it in
the past to accomplish this exact thing. Here is an example:
smbclient \\\\server\\temp password -U username -c "prompt;cd dir;get
file" >> logfile.log
Good luck,
Brian Hanks
Message: 3
From: Patrick Nelson <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: RE: silly script question
Date: Fri, 21 Feb 2003 21:53:34 -0800
Reply-To: [EMAIL PROTECTED]
Kerry Miller wrote:
----------------->>>>
Ok, I'm a network guy, not a software guy. I'm even lousy at bash scripts,
but here's a question.
I can get to a share from my windoze machine using smbclient and copy files
back to the linux box. I don't know how to put it into a script
though. Here's what I've got:
smbclient //kmiller/temp -U username%password
get <filename>
quit
When I do it manually, it works fine (assuming I put the real username,
password and filename in). I need to know how to tell the script to wait
for the prompt from the windoze box before it sends the next line. I tried
"sleep 5" but that didn't work. When I run the script, I get the smb
prompt from the windows machine, then it stops.
This can't be too tough, I'm just no good at scripting. I'd appreciate
some hints, or a place to RTFM would work!
----------------->>>>
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list