[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Multi-homed postproc, v2

From: Bob Carragher
Subject: Re: [Nmh-workers] Multi-homed postproc, v2
Date: Wed, 11 Mar 2015 20:42:40 -0700

On Wed, 11 Mar 2015 18:09:30 -0400 Ken Hornstein <address@hidden> sez:

> >It does, but then I can't use whom(1) since that will invoke the
> >script, leading to infinite recursion (at least, until the kernel
> >runs out of file descriptors B-).
> Well, like many things whom(1) calls post to do it's dirty
> work, with the undocumented -whom option.  So you could
> short-circuit whom and just call post(8) directly.  You'll
> probably need to add an -alias and -library option.  Or, you
> could simply check to see if there's a -whom argument present
> to your postproc and if it is do NOT call whom, but instead
> call post(8). Which now that I think about it, I should
> probably do in my script.

Ah, that works.  Thanks!

One other thing that I'm hoping the bash-experts on this ML can
help me with:  for some reason, bash seems to only save C-1
characters of output, where C is the number of columns in the
xterm in which I'm running the script.  i.e. C is the output of

     $ stty size | awk '{print $2}'

This is problematic if the output of post(1) is longer than 79
characters -- in particular, if the first occurrence of
" at stanford.edu" isn't complete by the 79th character.

My current solution is to do this at the top of the script:

     stty columns 9999

I then need to undo that if I don't want subsequent commands in
that window (like vim(1)) screwed up by the incorrect column
width, by doing the following at every script exit point:

     stty columns 80

Googling didn't turn up an obvious better solution (though I
admit my google-fu isn't strong).  Can anyone suggest a better
solution to this?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]