[Samba] Re: How can $VARIABLES be used inside smbclient -c'xyz' command strings?

Ben Griffith bgriffit at email.unc.edu
Tue May 21 05:14:03 GMT 2002

-----[ 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=
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)

My machine has:
GNU bash, version 2.05.8(1)-release (i386-redhat-linux-gnu)
and Samba 2.2.4


Ben Griffith
bgriffit at email.unc.edu

More information about the samba mailing list