[Samba] Re: How can $VARIABLES be used inside smbclient -c'xyz' command strings?
Joel Hammer
Joel at HammersHome.com
Mon May 20 20:13:02 GMT 2002
Will the ftp box act as an ftp server?
If so, an expect script might be a good way to transfer them.
This command worked fine for me:
smbclient //HAMMER2/ELLEN -N -c "put junkheader.txt"
where junkheader.txt is a file on the local system. $1 should work. The
original file name is preserved.
Joel
On Tue, May 21, 2002 at 04:36:39AM +0200, Kurt Pfeifle wrote:
> Kurt Pfeifle wrote:
> > Hi,
> >
> > being a total newbie in shellscripting and similar stuff, I
> > am suffering from a brain freeze around the following problem:
> >
> > * I need to print (or transfer otherwise) to a WinNT box;
> > * the files are send from inside a shellscript;
> > * the script gets the filename on the commandline when started;
> > * so the only knows it works on "$1";
> > * the problem is, that the original filename needs to be conserved
> > when it arrives on the WinShare...
> >
> > Anyone with a suggestion?
>
>
> What I tried is this:
> --------------------
>
> export FILENAME=testfile.ps
>
> kde-bitshop:/home/kde4 > smbclient //transmeta/ljet5 -N -c 'put $FILENAME'
> added interface ip=10.160.16.45 bcast=10.160.31.255 nmask=255.255.240.0
> Domain=[TUX-NET] OS=[Unix] Server=[Samba 2.2.4]
> $$FILENAME does not exist
>
> kde-bitshop:/home/kde4 > echo $FILENAME
> testfile.ps
>
> kde-bitshop:/home/kde4 > smbclient //transmeta/ljet5 -N -c "put $FILENAME"
> added interface ip=10.160.16.45 bcast=10.160.31.255 nmask=255.255.240.0
> Domain=[TUX-NET] OS=[Unix] Server=[Samba 2.2.4]
> $FILENAME does not exist
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: http://lists.samba.org/mailman/listinfo/samba
More information about the samba
mailing list