RE: [suse-sles-e] smbclient copy from linux box to windows

From: Black, Alain (ablack_at_bloodsystems.org)
Date: Tue Sep 12 2006 - 00:13:39 CEST


Date: Mon, 11 Sep 2006 15:13:39 -0700
Message-ID: <1066BDF1DAAA8040B54E0B5E270973100D4B28EF@bsimail.bloodsystems.org>
From: "Black, Alain" <ablack@bloodsystems.org>
Subject: RE: [suse-sles-e] smbclient copy from linux box to windows


> -----Original Message-----
> From: Peter Van Lone [mailto:petervl@gmail.com]
> Sent: Monday, September 11, 2006 2:03 PM
> To: SLES List
> Subject: Re: [suse-sles-e] smbclient copy from linux box to windows
>
> On 9/11/06, Black, Alain <ablack@bloodsystems.org> wrote:
> >
> > Here's what I use for a cron script.
> >
> > #!/usr/bin/ksh
> >
> > smbclient //ServerName/ShareName Password -U Domain/UserName <<EOF
> >
> > cd DirectoryToChangeInTo
> > translate
> > put FileName
> > exit
> > EOF
> >
>
> excellent.
>
> do you really put the <<EOF at the end of the smbclient command line?
Why?
>
> and, what does the "translate" command do?
>
> and, why the EOF at the very end?
>
> I know, I know ... enuf with the questions!
>
> peter
>

[Black, Alain]

You can use any character string that you like, I personally like EOF.
You're telling smbclient to read input until it reaches the EOF string
again. It's a way of automating some processes which normally aren't.
You could also have used expect, but this is faster, if not as clean.

The translate command translates from Linux/Unix text files to Windows
based text files. Handles all of those nasty Ctrl-M's for you. You may
not need this, but since you were talking log files, I thought I'd throw
it in.

Good luck,

-Alain.

---------------------------------------------------------------------
To unsubscribe, e-mail: suse-sles-e-unsubscribe@suse.com
For additional commands, e-mail: suse-sles-e-help@suse.com



This archive was generated by hypermail 2.1.7 : Tue Sep 12 2006 - 00:25:22 CEST