From: Todd on 2 Apr 2010 15:26 Hi All, There is a smb shared file out on my Samba Server that I would like to read from a bash script. Is there a way to do a one time read from my bash script without having to mount the share? Something like: cat smb://server/netlogon/startup.bat \ -u=todd -p=foo | grep -i set > $0.tmp Many thanks, -T
From: Stan Bischof on 2 Apr 2010 15:35 Todd <todd(a)invalid.com> wrote: > Hi All, > > There is a smb shared file out on my Samba Server > that I would like to read from a bash script. > Is there a way to do a one time read from my > bash script without having to mount the share? > > Something like: > > cat smb://server/netlogon/startup.bat \ > -u=todd -p=foo | grep -i set > $0.tmp > sounds like what you want is smbclient Stan
From: Douglas Mayne on 2 Apr 2010 15:35 On Fri, 02 Apr 2010 12:26:59 -0700, Todd wrote: > Hi All, > > There is a smb shared file out on my Samba Server that I would like to > read from a bash script. Is there a way to do a one time read from my > bash script without having to mount the share? > > Something like: > > cat smb://server/netlogon/startup.bat \ > -u=todd -p=foo | grep -i set > $0.tmp > > Many thanks, > -T > I mostly use mount.cifs, but there are other methods also. man smbclient -- Douglas Mayne
From: Todd on 2 Apr 2010 15:48 On 04/02/2010 12:35 PM, Douglas Mayne wrote: > On Fri, 02 Apr 2010 12:26:59 -0700, Todd wrote: > >> Hi All, >> >> There is a smb shared file out on my Samba Server that I would like to >> read from a bash script. Is there a way to do a one time read from my >> bash script without having to mount the share? >> >> Something like: >> >> cat smb://server/netlogon/startup.bat \ >> -u=todd -p=foo | grep -i set> $0.tmp >> >> Many thanks, >> -T >> > I mostly use mount.cifs, but there are other methods also. > > man smbclient But, can I do it without mounting the share. I want to do it on the fly.
From: Todd on 2 Apr 2010 15:49
On 04/02/2010 12:35 PM, Stan Bischof wrote: > Todd<todd(a)invalid.com> wrote: >> Hi All, >> >> There is a smb shared file out on my Samba Server >> that I would like to read from a bash script. >> Is there a way to do a one time read from my >> bash script without having to mount the share? >> >> Something like: >> >> cat smb://server/netlogon/startup.bat \ >> -u=todd -p=foo | grep -i set> $0.tmp >> > > sounds like what you want is smbclient > > Stan Hi Stan, I usually use cifs. And, I want to do it on the fly -- no mounting -T |