Re: [PLUG] awk: is field blank?

2021-11-01 Thread Rich Shepard

On Mon, 1 Nov 2021, Steve Dum wrote:


Awk programs are a collection of
  pattern {action}


So I discovered a couple of decades ago.

Thank you,

Rich



Re: [PLUG] awk: is field blank?

2021-11-01 Thread Steve Dum




Rich Shepard wrote:

BEGIN {FS="|";OFS="|"}
if {$8!=""} {
  print $0
   } 

Awk programs are a collection of
  pattern {action}
an expression like    if ($8 != "") { print $0 }
is a statement, (something that goes in an action, with the pattern omitted
actions are wrapped in curly braces, so one would write something like
{if ($8 != "") {
    print $0
   }
}
also, note that the expression the if is testing is wrapped with 
parenthesis, not curly braces.
or of course, instead of omitting the pattern, you could make the 
pattern be the condition

being tested, and the action being to print the line.
   pattern: $8 != ""
   action: print $0
and write
$8 != "" { print $0 }

and the $0 is redundant, as {print}  does the same thing
or leave out the whole { print $0} as that's the default action if none 
is specified


Now if your going for what I think you said originally, values in all 8 
fields, the simplest form is

to detect one or more fields being blank and printing those lines is
$1==""||$2=="" || $3=="" || $4=="" || $5=="" || $6=="" || $7=="" || $8==""
as if the action is missing printing the line is done by default.

Of course if your doing more complex processing, rather than simply, check
that all 8 fields contain data, you may want to create  some pattern 
{action} lines

w/o using the defaults.
steve



Re: [PLUG] Dovecot Problem

2021-11-01 Thread Paul Heinlein

On Mon, 1 Nov 2021, Galen Seitz wrote:


On 10/31/21 16:04, Randy Bush wrote:
Here is the relevant part of the 10-director.conf file (Line 30 is 
"service

director {)

# To enable director service, uncomment the modes and assign a port.
service director {
   unix_listener login/director {
 #mode = 0666
   }
   fifo_listener login/proxy-notify {
 #mode = 0666
   }
   unix_listener director-userdb {
 #mode = 0600
   }
   inet_listener {
 #port =
   }
}


likely a missing closing brace in teh stanza *above* the service director



Agreed.  If you didn't touch the 10-director.conf file (and it looks like you 
didn't, as what you posted matches mine), then the problem is likely to be in 
10-auth.conf or dovecot.conf itself.


I think the *.conf files in /etc/dovecot/conf.d are parsed 
alphabetically. Any *.conf file may include other files (typically, 
*.ext, but that's a convention not a necessity).


So you'll need to parse from dovecot.conf downward through that file 
progression.


--
Paul Heinlein
heinl...@madboa.com
45.38° N, 122.59° W

Re: [PLUG] Dovecot Problem

2021-11-01 Thread Galen Seitz

On 10/31/21 16:04, Randy Bush wrote:

Here is the relevant part of the 10-director.conf file (Line 30 is "service
director {)

# To enable director service, uncomment the modes and assign a port.
service director {
   unix_listener login/director {
 #mode = 0666
   }
   fifo_listener login/proxy-notify {
 #mode = 0666
   }
   unix_listener director-userdb {
 #mode = 0600
   }
   inet_listener {
 #port =
   }
}


likely a missing closing brace in teh stanza *above* the service director



Agreed.  If you didn't touch the 10-director.conf file (and it looks 
like you didn't, as what you posted matches mine), then the problem is 
likely to be in 10-auth.conf or dovecot.conf itself.


galen
--
Galen Seitz
gal...@seitzassoc.com