[Samba] Re: How can $VARIABLES be used inside smbclient -c'xyz' command strings?
kpfeifle at danka.de
Tue May 21 05:42:04 GMT 2002
Ben Griffith wrote:
> -----[ kpfeifle at danka.de wrote ]-----
> --> *I* need to call it by its reference as a commandline parameter.
> This seems to work for me.
> smbclient //$1/$2 -c "put $3" -U foo
> I have domain security so I placed the username switch on the end. When
> I drop this in a shell script ( xfer ) where I pass in $1, $2, and $3
> from the command line I get:
> [ben at monolith ben]$ xfer monolith share ip.rules.txt
> INFO: Debug class all level = 3 (pid 1490 from pid 1490)
> added interface ip=xxx.xxx.xxx.xxx bcast=xxx.xxx.xxx.xxx nmask=255.255.0.0
> Domain=[OISSOMNT] OS=[Unix] Server=[Samba 2.2.4]
> putting file ip.rules.txt as \ip.rules.txt (31.3 kb/s) (average 31.3 kb/s)
at least I know now it *ought* to work with double quotes for -c....
> My machine has:
> GNU bash, version 2.05.8(1)-release (i386-redhat-linux-gnu)
> and Samba 2.2.4
Samba 2.2.4 here and
GNU bash, version 2.05.0(1)-release (i386-suse-linux)
More information about the samba