diff -r 4e45b9a177c2 -r 91a210d3b66a relpipe-data/examples.xml --- a/relpipe-data/examples.xml Mon Dec 10 19:43:48 2018 +0100 +++ b/relpipe-data/examples.xml Mon Dec 10 21:45:48 2018 +0100 @@ -383,7 +383,7 @@
We want to change all lines from alpha
to beta
(the new VG name).
- This can be done by:
+ This can be done by the power of regular expressions
+ If we are interested only in certain records in some relation, we can filter it using relpipe-tr-grep
.
+ If we want to list e.g. only Btrfs and XFS file systems from our fstab
(see above), we will run:
+
and we will get following filtered result:
+ + +
+ Command arguments are similar to relpipe-tr-sed
.
+ Everything is a regular expression.
+ Only relations matching the regex will be filtered, others will flow through the pipeline unmodified.
+ If the attribute regex matches more attribute names, filtering will be done with logical OR
+ i.e. the record is included if at least one of that attributes matches the search regex.
+
+ If we need exact match of the whole attribute, we have to use something like '^btrfs|xfs$'
,
+ otherwise mere substring-match is enough to include the record.
+