commit 739aa1aa7238e88648d0026033189f05bcd10b16 parent 36f0f538f0a7ce007f6429b7ac8bc67b49420dbb Author: Jacob R. Edwards <n/a> Date: Sun, 4 Dec 2022 19:28:24 -0600 Add comment stripping script It's intended purpose is to be a common configuration file pre-processor for various scripts. Diffstat:
| A | local/bin/bin/nocomment | | | 9 | +++++++++ |
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/local/bin/bin/nocomment b/local/bin/bin/nocomment @@ -0,0 +1,9 @@ +#!/bin/sh +# Copyright 2022 Jacob R. Edwards +# Simple script to remove sh-style comments +# +# (Note that it has no concept of sh(1) escaping, as it's true +# purpose is to provide a common comment stripping facility for +# basic configuration files.) + +sed -E '/^#/d; /[ ]+#.*//'