diff mbox series

[v8,04/10] common: add _filter_trailing_whitespace

Message ID 6f15c20d955e7a0bd57c5647ad0f6548af43fd2e.1704344811.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series fstests: add tests for btrfs' raid-stripe-tree feature | expand

Commit Message

Anand Jain Jan. 4, 2024, 5:48 a.m. UTC
The command 'btrfs inspect-internal dump-tree -t raid_stripe'
introduces trailing whitespace in its output.
Apply a filter to remove it. Used in btrfs/30[4-8][.out].

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 common/filter | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/common/filter b/common/filter
index 509ee95039ac..36d51bd957dd 100644
--- a/common/filter
+++ b/common/filter
@@ -651,5 +651,10 @@  _filter_bash()
 	sed -e "s/^bash: line 1: /bash: /"
 }
 
+_filter_trailing_whitespace()
+{
+	sed -E -e "s/\s+$//"
+}
+
 # make sure this script returns success
 /bin/true