All of lore.kernel.org
 help / color / mirror / Atom feed
* [mlmmj] mlmmj-maintd recursively
@ 2010-10-03 22:09 Florian Effenberger
  2010-10-05  9:34 ` Thomas Goirand
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Florian Effenberger @ 2010-10-03 22:09 UTC (permalink / raw)
  To: mlmmj

Hi,

is there an option to run mlmmj-maintd recursively? My Ubuntu cron
script invokes

/usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj

However, I have my list organized in

/var/spool/mlmmj/site1.org
/var/spool/mlmmj/site2.org

and the like, and it seems that the above command at least doesn't
send out digests. I just invoked it manually with

/usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj/site1.org
/usr/bin/mlmmj-maintd -F -d /var/spool/mlmmjsite2.org

and this seems to work.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
@ 2010-10-05  9:34 ` Thomas Goirand
  2010-10-05  9:38 ` Mads Martin Jørgensen
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Thomas Goirand @ 2010-10-05  9:34 UTC (permalink / raw)
  To: mlmmj

Florian Effenberger wrote:
> Hi,
> 
> is there an option to run mlmmj-maintd recursively? My Ubuntu cron
> script invokes
> 
> /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj
> 
> However, I have my list organized in
> 
> /var/spool/mlmmj/site1.org
> /var/spool/mlmmj/site2.org
> 
> and the like, and it seems that the above command at least doesn't
> send out digests. I just invoked it manually with
> 
> /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj/site1.org
> /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmjsite2.org
> 
> and this seems to work.
> 
> Thanks,
> Florian

Hint:

find /var/spool/mlmmj -type d -exec \
	/usr/bin/mlmmj-maintd -F -d {} \;

Thomas


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
  2010-10-05  9:34 ` Thomas Goirand
@ 2010-10-05  9:38 ` Mads Martin Jørgensen
  2010-10-05 23:23 ` Ben Schmidt
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Mads Martin Jørgensen @ 2010-10-05  9:38 UTC (permalink / raw)
  To: mlmmj

On Tue, Oct 5, 2010 at 11:34 AM, Thomas Goirand <thomas@goirand.fr> wrote:
> find /var/spool/mlmmj -type d -exec \
>        /usr/bin/mlmmj-maintd -F -d {} \;

Exactly. This is a solid FAQ/Hints documentation candidate.

-- 
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                 -- A. P. J.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
  2010-10-05  9:34 ` Thomas Goirand
  2010-10-05  9:38 ` Mads Martin Jørgensen
@ 2010-10-05 23:23 ` Ben Schmidt
  2010-10-11 10:35 ` Florian Effenberger
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ben Schmidt @ 2010-10-05 23:23 UTC (permalink / raw)
  To: mlmmj

(We lost the list; adding it back.)

On 6/10/10 3:14 AM, Thomas Goirand wrote:
> Ben Schmidt wrote:
>> On 5/10/10 8:34 PM, Thomas Goirand wrote:
>>> Florian Effenberger wrote:
>>>> Hi,
>>>>
>>>> is there an option to run mlmmj-maintd recursively? My Ubuntu cron
>>>> script invokes
>>>>
>>>> /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj
>>>>
>>>> However, I have my list organized in
>>>>
>>>> /var/spool/mlmmj/site1.org
>>>> /var/spool/mlmmj/site2.org
>>>>
>>>> and the like, and it seems that the above command at least doesn't
>>>> send out digests. I just invoked it manually with
>>>>
>>>> /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj/site1.org
>>>> /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmjsite2.org
>>>>
>>>> and this seems to work.
>>>>
>>>> Thanks,
>>>> Florian
>>>
>>> Hint:
>>>
>>> find /var/spool/mlmmj -type d -exec \
>>>      /usr/bin/mlmmj-maintd -F -d {} \;
>>
>> Won't this also go too shallow and deep, though? I.e. it will run
>
> Use the -maxdepth option then!
>
> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
> 	/usr/bin/mlmmj-maintd -F -d {} \;
>
> the -mindepth 1 will remove /var/spool/mlmmj/ itself that would be
> otherwise listed...

Wonderful! I should work on my find(1) voodoo.

I have integrated this into the README for future releases. It will show
up in version control once I get around to pushing it.

Ben.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
                   ` (2 preceding siblings ...)
  2010-10-05 23:23 ` Ben Schmidt
@ 2010-10-11 10:35 ` Florian Effenberger
  2010-10-11 11:21 ` Ben Schmidt
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Florian Effenberger @ 2010-10-11 10:35 UTC (permalink / raw)
  To: mlmmj

Hi,

2010/10/6 Ben Schmidt <mail_ben_schmidt@yahoo.com.au>:

>> Use the -maxdepth option then!
>>
>> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
>>        /usr/bin/mlmmj-maintd -F -d {} \;
>>
>> the -mindepth 1 will remove /var/spool/mlmmj/ itself that would be
>> otherwise listed...
>
> Wonderful! I should work on my find(1) voodoo.
>
> I have integrated this into the README for future releases. It will show
> up in version control once I get around to pushing it.

at least on Ubuntu, it has to read

find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d -exec
/usr/bin/mlmmj-maintd -F -d {} \;

(you were missing the -exec)

Florian



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
                   ` (3 preceding siblings ...)
  2010-10-11 10:35 ` Florian Effenberger
@ 2010-10-11 11:21 ` Ben Schmidt
  2010-10-11 13:59 ` Thomas Goirand
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ben Schmidt @ 2010-10-11 11:21 UTC (permalink / raw)
  To: mlmmj

On 11/10/10 9:35 PM, Florian Effenberger wrote:
> Hi,
>
> 2010/10/6 Ben Schmidt<mail_ben_schmidt@yahoo.com.au>:
>
>>> Use the -maxdepth option then!
>>>
>>> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
>>>         /usr/bin/mlmmj-maintd -F -d {} \;
>>>
>>> the -mindepth 1 will remove /var/spool/mlmmj/ itself that would be
>>> otherwise listed...
>>
>> Wonderful! I should work on my find(1) voodoo.
>>
>> I have integrated this into the README for future releases. It will show
>> up in version control once I get around to pushing it.
>
> at least on Ubuntu, it has to read
>
> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d -exec
> /usr/bin/mlmmj-maintd -F -d {} \;
>
> (you were missing the -exec)

Oops! Thanks. Fixed.

Ben.






^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
                   ` (4 preceding siblings ...)
  2010-10-11 11:21 ` Ben Schmidt
@ 2010-10-11 13:59 ` Thomas Goirand
  2010-10-11 22:13 ` Ben Schmidt
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Thomas Goirand @ 2010-10-11 13:59 UTC (permalink / raw)
  To: mlmmj

Ben Schmidt wrote:
> On 11/10/10 9:35 PM, Florian Effenberger wrote:
>> Hi,
>>
>> 2010/10/6 Ben Schmidt<mail_ben_schmidt@yahoo.com.au>:
>>
>>>> Use the -maxdepth option then!
>>>>
>>>> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
>>>>         /usr/bin/mlmmj-maintd -F -d {} \;
>>>>
>>>> the -mindepth 1 will remove /var/spool/mlmmj/ itself that would be
>>>> otherwise listed...
>>>
>>> Wonderful! I should work on my find(1) voodoo.
>>>
>>> I have integrated this into the README for future releases. It will show
>>> up in version control once I get around to pushing it.
>>
>> at least on Ubuntu, it has to read
>>
>> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d -exec
>> /usr/bin/mlmmj-maintd -F -d {} \;
>>
>> (you were missing the -exec)
> 
> Oops! Thanks. Fixed.
> 
> Ben.

When I wrote "hint", in meant:

"I'm using something unchecked from the top of my head, please test
anything before writing a doc, or using it in production"

:)

So yes, the correct way was:

find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
	-exec /usr/bin/mlmmj-maintd -F -d {} \;

Thomas


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
                   ` (5 preceding siblings ...)
  2010-10-11 13:59 ` Thomas Goirand
@ 2010-10-11 22:13 ` Ben Schmidt
  2010-10-12  2:33 ` Thomas Goirand
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ben Schmidt @ 2010-10-11 22:13 UTC (permalink / raw)
  To: mlmmj

On 12/10/10 12:59 AM, Thomas Goirand wrote:
>>> at least on Ubuntu, it has to read
>>>
>>> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d -exec
>>> /usr/bin/mlmmj-maintd -F -d {} \;
>>>
>>> (you were missing the -exec)
>>
>> Oops! Thanks. Fixed.
>>
>> Ben.
>
> When I wrote "hint", in meant:
>
> "I'm using something unchecked from the top of my head, please test
> anything before writing a doc, or using it in production"
>
> :)

Yeah, I did try it out; you actually got it right the first time anyway,
IIRC. The -exec just got lost when the -m..depth options were added and
I didn't notice. So it tested fine, but when I copy/pasted for the docs,
it wasn't. My oops, not yours!

:-)

> So yes, the correct way was:
>
> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
> 	-exec /usr/bin/mlmmj-maintd -F -d {} \;

Actually, on my system it looks like the trailing slash should be
omitted, too, or there is a double slash in the argument passed to
mlmmj-maintd. Probably doesn't matter, but is a little unconventional,
so I'll take the slash out of the docs.

Ben.






^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
                   ` (6 preceding siblings ...)
  2010-10-11 22:13 ` Ben Schmidt
@ 2010-10-12  2:33 ` Thomas Goirand
  2010-10-12  3:35 ` Ben Schmidt
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Thomas Goirand @ 2010-10-12  2:33 UTC (permalink / raw)
  To: mlmmj


----- Original message -----
> > find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
> >     -exec /usr/bin/mlmmj-maintd -F -d {} \;
> 
> Actually, on my system it looks like the trailing slash should be
> omitted, too, or there is a double slash in the argument passed to
> mlmmj-maintd. Probably doesn't matter, but is a little unconventional,
> so I'll take the slash out of the docs.
> 
> Ben.

Using the shell, you add a \
to tell that you want to go to the line but \
you haven't finished your sentence... :)

Thomas




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
                   ` (7 preceding siblings ...)
  2010-10-12  2:33 ` Thomas Goirand
@ 2010-10-12  3:35 ` Ben Schmidt
  2010-10-12  7:29 ` Richard Mortimer
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ben Schmidt @ 2010-10-12  3:35 UTC (permalink / raw)
  To: mlmmj

On 12/10/10 1:33 PM, Thomas Goirand wrote:
>
> ----- Original message -----
>>> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
>>>      -exec /usr/bin/mlmmj-maintd -F -d {} \;
>>
>> Actually, on my system it looks like the trailing slash should be
>> omitted, too, or there is a double slash in the argument passed to
>> mlmmj-maintd. Probably doesn't matter, but is a little unconventional,
>> so I'll take the slash out of the docs.
>>
>> Ben.
>
> Using the shell, you add a \
> to tell that you want to go to the line but \
> you haven't finished your sentence... :)
>
> Thomas

No, I meant the forward slash at the end of /var/spool/mlmmj/. With it,
on my system, find gives things such as

     /var/spool/mlmmj//test-list

to the command it executes. Note the double slash. It's arguably a bug
in my find command, probably doesn't happen in other implementations,
and doesn't affect the interpretation of the path, at least on my
system, but it's more usual not to have the double, and removing the
trailing slash and just using /var/spool/mlmmj achieves this.

I left the backslash in. That's perfectly common shell syntax that
anyone competent should recognise.

Ben.






^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
                   ` (8 preceding siblings ...)
  2010-10-12  3:35 ` Ben Schmidt
@ 2010-10-12  7:29 ` Richard Mortimer
  2010-10-12 10:19 ` Ben Schmidt
  2010-10-12 17:59 ` Franky Van Liedekerke
  11 siblings, 0 replies; 13+ messages in thread
From: Richard Mortimer @ 2010-10-12  7:29 UTC (permalink / raw)
  To: mlmmj



On 12/10/2010 04:35, Ben Schmidt wrote:
> On 12/10/10 1:33 PM, Thomas Goirand wrote:
>>
>> ----- Original message -----
>>>> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
>>>> -exec /usr/bin/mlmmj-maintd -F -d {} \;
>>>
>>> Actually, on my system it looks like the trailing slash should be
>>> omitted, too, or there is a double slash in the argument passed to
>>> mlmmj-maintd. Probably doesn't matter, but is a little unconventional,
>>> so I'll take the slash out of the docs.
>>>
>>> Ben.
>>
>> Using the shell, you add a \
>> to tell that you want to go to the line but \
>> you haven't finished your sentence... :)
>>
>> Thomas
>
> No, I meant the forward slash at the end of /var/spool/mlmmj/. With it,
> on my system, find gives things such as
>
> /var/spool/mlmmj//test-list
>
> to the command it executes. Note the double slash. It's arguably a bug
> in my find command, probably doesn't happen in other implementations,
> and doesn't affect the interpretation of the path, at least on my
> system, but it's more usual not to have the double, and removing the
> trailing slash and just using /var/spool/mlmmj achieves this.
>
> I left the backslash in. That's perfectly common shell syntax that
> anyone competent should recognise.
>

The trailing \; is generally required too. Without it the shell can/will 
treat the ; as a command separator rather than a command argument. Some 
versions of find may be happy without the ; at the end of exec but not 
all are.

Regards

Richard


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
                   ` (9 preceding siblings ...)
  2010-10-12  7:29 ` Richard Mortimer
@ 2010-10-12 10:19 ` Ben Schmidt
  2010-10-12 17:59 ` Franky Van Liedekerke
  11 siblings, 0 replies; 13+ messages in thread
From: Ben Schmidt @ 2010-10-12 10:19 UTC (permalink / raw)
  To: mlmmj

>>>>> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
>>>>> -exec /usr/bin/mlmmj-maintd -F -d {} \;
>>>>
> The trailing \; is generally required too. Without it the shell can/will treat the
> ; as a command separator rather than a command argument. Some versions of find may
> be happy without the ; at the end of exec but not all are.

Yep, I've left that there too, I think. I'll double check. My find
definitely needs it.

Thanks for mentioning, Richard.

Ben.






^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [mlmmj] mlmmj-maintd recursively
  2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
                   ` (10 preceding siblings ...)
  2010-10-12 10:19 ` Ben Schmidt
@ 2010-10-12 17:59 ` Franky Van Liedekerke
  11 siblings, 0 replies; 13+ messages in thread
From: Franky Van Liedekerke @ 2010-10-12 17:59 UTC (permalink / raw)
  To: mlmmj

On Tue, 12 Oct 2010 21:19:31 +1100
Ben Schmidt <mail_ben_schmidt@yahoo.com.au> wrote:

> >>>>> find /var/spool/mlmmj/ -mindepth 1 -maxdepth 1 -type d \
> >>>>> -exec /usr/bin/mlmmj-maintd -F -d {} \;
> >>>>
> > The trailing \; is generally required too. Without it the shell
> > can/will treat the ; as a command separator rather than a command
> > argument. Some versions of find may be happy without the ; at the
> > end of exec but not all are.
> 
> Yep, I've left that there too, I think. I'll double check. My find
> definitely needs it.
> 
> Thanks for mentioning, Richard.
> 
> Ben.

Hi,

Just fyi: the ";" at the end marks the end of the exec part of the find
command and always needs to be escaped.

Franky


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-10-12 17:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-03 22:09 [mlmmj] mlmmj-maintd recursively Florian Effenberger
2010-10-05  9:34 ` Thomas Goirand
2010-10-05  9:38 ` Mads Martin Jørgensen
2010-10-05 23:23 ` Ben Schmidt
2010-10-11 10:35 ` Florian Effenberger
2010-10-11 11:21 ` Ben Schmidt
2010-10-11 13:59 ` Thomas Goirand
2010-10-11 22:13 ` Ben Schmidt
2010-10-12  2:33 ` Thomas Goirand
2010-10-12  3:35 ` Ben Schmidt
2010-10-12  7:29 ` Richard Mortimer
2010-10-12 10:19 ` Ben Schmidt
2010-10-12 17:59 ` Franky Van Liedekerke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.