config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit f5f74247e4048567bc4bc72c87015e5749c8a35f
parent fdf0cf4306b0e2f086f4984b856244a6ac902dc9
Author: Jacob R. Edwards <n/a>
Date:   Mon,  5 Dec 2022 22:49:50 -0600

Use sed directly in nocomment

There was not much point in invoking sh(1) just to invoke sed
(besides maybe portability with shebang arguments, but I already
assume at least one is accepted).

Diffstat:
Mlocal/bin/bin/nocomment | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/local/bin/bin/nocomment b/local/bin/bin/nocomment @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/sed -Ef # Copyright 2022 Jacob R. Edwards # Simple script to remove sh-style comments # @@ -6,4 +6,5 @@ # purpose is to provide a common comment stripping facility for # basic configuration files.) -sed -E '/^#/d; s/[ ]+#.*//' +/^#/d +s/[ ]+#.*//