aboutsummaryrefslogtreecommitdiffstats
path: root/tests/infrastructure/clean.awk
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-23 10:24:56 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-23 10:25:15 +0100
commit55b3baa54a9b5253a3de90f1917808582cd5fa94 (patch)
tree132b997514bfb50668c92d3e5d72f45e01dfee27 /tests/infrastructure/clean.awk
parentbuild(flake): Update (diff)
downloadnixos-config-55b3baa54a9b5253a3de90f1917808582cd5fa94.zip
tests(tests): Initialize infrastructure and documentation for it
Diffstat (limited to '')
-rw-r--r--tests/infrastructure/clean.awk13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/infrastructure/clean.awk b/tests/infrastructure/clean.awk
new file mode 100644
index 00000000..1208b1ef
--- /dev/null
+++ b/tests/infrastructure/clean.awk
@@ -0,0 +1,13 @@
+{
+ # Shell like comments
+ gsub(/^#.*$/, "", $0)
+
+ # Strip leading and trailing white space
+ gsub(/^[[:blank:]]*/, "", $0)
+ gsub(/[[:blank:]]*$/, "", $0)
+
+ # Only accept the line, if it contains something
+ if (NF) {
+ print $0
+ }
+}