Test results for Solaris x86

test_001090_option_expel

Test description

Test for the expulsion of input records that match the expel criteria.
Expel the first three records if they contain fields with the string
"root" in the 1st field or the string "0" in the 3rd or 4th field.
Expel all input records that are 20 characters in length or less.
Expel from the 3rd input record onwards if the 4th field contains
the string "513", also test alternative string delimiters.
Expel all input records that contain the string "*LK* in the 2nd field.
Expel all input records that contain the string "/home/" in the 2nd to
4th or seventh fields.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -F : -E n1-3,f1/root/,f3-4/0/ -E c1-20 -E 'n3-$,f4%513%' -E 'f2/*LK*/' -E 'f6//home//:2-4,7'

Input data

root:x:0:0:Super-User:/:/sbin/sh
bin:x:2:2::/usr/bin:
guest:x:501:513:Guest user:/home/guest:/bin/rsh
ag:x:600:602:Arthur Gouros:/home/ag:/bin/bash
webdav:*LK*:701:703:Web Dav user:/etc/webdav:/bin/false

Output result

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xmlfy SYSTEM "xmlfy.dtd">
<xmlfy>
  <line>
    <field>ag</field>
    <field>Arthur Gouros</field>
    <field>/home/ag</field>
  </line>
</xmlfy>

Goto:   Top of page.   Section "Environment".   Section "Summary".   Section "Test cases".