config

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

commit a8657d3f52f667690d8bf1a5988d6e8935dd6905
parent 91a79a874fba12bd64f5fe22a8850214631323b3
Author: Jacob R. Edwards <n/a>
Date:   Wed, 20 Jul 2022 15:27:15 -0700

Give dash ('-') meaning identical to plus ('+') in netquery

Diffstat:
Mlocal/bin/bin/netquery | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/local/bin/bin/netquery b/local/bin/bin/netquery @@ -1,14 +1,14 @@ -#!/usr/bin/awk -f +#!/bin/sh # Copyright 2021 Jacob R. Edwards # # Find the url shortcut specified by the first argument and replace # `$query' with the subsequent arguments concatnated on `+'. -BEGIN { +awk 'BEGIN { FS = " "; i = 1 - if (ARGV[i] ~ /^\+/) { + if (ARGV[i] ~ /^[-+]/) { query = substr(ARGV[i], 2) delete ARGV[i] ++i; @@ -37,4 +37,4 @@ BEGIN { } print $2; exit 0 -} +}' "$@"