procmail
[Top] [All Lists]

Re: formail -- order of arguments matters????

1997-07-26 14:24:00
Timothy Luoma asked,

| I thought "good programming" (of which I know very little) dictates that the  
| order of arguments should not matter? (I could be wrong here).

When an option takes an argument of its own, the argument must appear next
after that option letter.  -x takes an argument; the thing following -x
has to be that argument.  You can't insert other options in between.

| But when I try to use this:
| 
|       FROM=`formail -xzFrom:`
| 
| FROM gets set to nothing....

What's happening there is that the argument to the -x option is "zFrom:", so
procmail tries to extract the contents of the Zfrom: header, but it doesn't
find any, so you get no output.

| This works
| 
|       FROM=`formail -zxFrom:`
| 
| and FROM gets set to
| 
|       Timothy Luoma <luomat(_at_)peak(_dot_)org>

Yes.  "From:" is immediately after "-x".

| I don't remember ever hearing about this before.

It's more of a Unix question, actually.

<Prev in Thread] Current Thread [Next in Thread>