[Samba] Re: How can $VARIABLES be used inside smbclient -c'xyz' command strings?
Kurt Pfeifle
kpfeifle at danka.de
Mon May 20 19:44:02 GMT 2002
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
More information about the samba
mailing list