From: Todd on
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
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
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
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
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
 |  Next  |  Last
Pages: 1 2 3 4 5
Prev: figuring out the active terminal
Next: bash unresponsive