"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: useless grep
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Mon, 31 Oct 2022 17:15:46 +0100

Download raw body.

Thread
  • Omar Polo:

    useless grep

    • Stefan Sperling:

      useless grep

On Mon, Oct 31, 2022 at 04:13:01PM +0100, Omar Polo wrote:
> awk is powerful enough :)
> 

Neat!
As you can probably guess, this is already beyond my current awk skills.

ok :)

> diff /home/op/w/got
> commit - ad8ccd554bb28e347cf0e997429a408457280182
> path + /home/op/w/got
> blob - 7c2992be4f288b02a06aa7cc8ee97b9df22737f2
> file + regress/gotd/Makefile
> --- regress/gotd/Makefile
> +++ regress/gotd/Makefile
> @@ -5,12 +5,12 @@ GOTD_DEVUSER_HOME!=userinfo $(GOTD_DEVUSER) | grep ^di
>  
>  GOTD_TEST_ROOT=/tmp
>  GOTD_DEVUSER?=gotdev
> -GOTD_DEVUSER_HOME!=userinfo $(GOTD_DEVUSER) | grep ^dir | awk '{print $$2}'
> +GOTD_DEVUSER_HOME!=userinfo $(GOTD_DEVUSER) | awk '/^dir/ {print $$2}'
>  GOTD_TEST_REPO!?=mktemp -d "$(GOTD_TEST_ROOT)/gotd-test-repo-XXXXXXXXX"
>  GOTD_TEST_REPO_URL=ssh://${GOTD_DEVUSER}@127.0.0.1/test-repo
>  
>  GOTD_TEST_USER?=${LOGNAME}
> -GOTD_TEST_USER_HOME!=userinfo $(GOTD_TEST_USER) | grep ^dir | awk '{print $$2}'
> +GOTD_TEST_USER_HOME!=userinfo $(GOTD_TEST_USER) | awk '/^dir/ {print $$2}'
>  
>  # gotd.conf parameters
>  GOTD_USER?=got
> 
> 
> 
>