225 # The array 'keyword_behavior' specifies the special treatment of
226 # [type, keyword] combinations subject to value merging.
227 keyword_behavior["prof", "auths"] = "merge";
228 keyword_behavior["prof", "profiles"] = "merge";
229 keyword_behavior["prof", "privs"] = "merge";
230 keyword_behavior["user", "auths"] = "merge";
231 keyword_behavior["user", "profiles"] = "merge";
232 keyword_behavior["user", "roles"] = "merge";
233
234 FS=":"
235 }
236
237 # When FNR (current file record number) is 1 it indicates that nawk
238 # is starting to read the next file specified on its command line,
239 # and is beginning the next processing pass.
240 FNR == 1 {
241 pass++;
242 }
243
244 /^#/ || /^$/ {
245 continue;
246 }
247
248 {
249 # For each input line, nawk automatically assigns the complete
250 # line to $0 and also splits the line at field separators and
251 # assigns each field to a variable $1..$n. Assignment to $0
252 # re-splits the line into the field variables. Conversely,
253 # assgnment to a variable $1..$n will cause $0 to be recomputed
254 # from the field variable values.
255 #
256 # This code adds awareness of escaped field separators by using
257 # a custom function to split the line into a temporary array.
258 # It assigns the empty string to $0 to clear any excess field
259 # variables, and assigns the desired elements of the temporary
260 # array back to the field variables $1..$7.
261 #
262 # Subsequent code must not assign directly to $0 or the fields
263 # will be re-split without regard to escaped field separators.
264 split_escape($0, f, ":");
265 $0 = "";
266 $1 = f[1];
267 $2 = f[2];
268 $3 = f[3];
269 $4 = f[4];
270 $5 = f[5];
271 $6 = f[6];
272 $7 = f[7];
273 }
|
225 # The array 'keyword_behavior' specifies the special treatment of
226 # [type, keyword] combinations subject to value merging.
227 keyword_behavior["prof", "auths"] = "merge";
228 keyword_behavior["prof", "profiles"] = "merge";
229 keyword_behavior["prof", "privs"] = "merge";
230 keyword_behavior["user", "auths"] = "merge";
231 keyword_behavior["user", "profiles"] = "merge";
232 keyword_behavior["user", "roles"] = "merge";
233
234 FS=":"
235 }
236
237 # When FNR (current file record number) is 1 it indicates that nawk
238 # is starting to read the next file specified on its command line,
239 # and is beginning the next processing pass.
240 FNR == 1 {
241 pass++;
242 }
243
244 /^#/ || /^$/ {
245 next;
246 }
247
248 {
249 # For each input line, nawk automatically assigns the complete
250 # line to $0 and also splits the line at field separators and
251 # assigns each field to a variable $1..$n. Assignment to $0
252 # re-splits the line into the field variables. Conversely,
253 # assignment to a variable $1..$n will cause $0 to be recomputed
254 # from the field variable values.
255 #
256 # This code adds awareness of escaped field separators by using
257 # a custom function to split the line into a temporary array.
258 # It assigns the empty string to $0 to clear any excess field
259 # variables, and assigns the desired elements of the temporary
260 # array back to the field variables $1..$7.
261 #
262 # Subsequent code must not assign directly to $0 or the fields
263 # will be re-split without regard to escaped field separators.
264 split_escape($0, f, ":");
265 $0 = "";
266 $1 = f[1];
267 $2 = f[2];
268 $3 = f[3];
269 $4 = f[4];
270 $5 = f[5];
271 $6 = f[6];
272 $7 = f[7];
273 }
|