From db7321af115a79b63267cb18889cbd334e8ca6e2 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 6 Dec 2023 20:58:18 +0100 Subject: scripts: Move many a script from sh to andy --- .local/bin/aqry | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to '.local/bin/aqry') diff --git a/.local/bin/aqry b/.local/bin/aqry index 6daef5d..38c70f3 100755 --- a/.local/bin/aqry +++ b/.local/bin/aqry @@ -1,15 +1,13 @@ -#!/bin/sh +#!/usr/local/bin/andy -set -e +set ADDR_FILE $(XDG_CONFIG_HOME:$HOME/.config)/aerc/addresses -readonly ADDR_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/aerc/addresses" +awk -v qry=$args[1] ' + BEGIN { + FS = "\t" + } -awk -v qry="$1" ' -BEGIN { - FS = "\t" -} - -$1 ~ qry { - printf "%s\t%s\n", $2, $1 -} -' "$ADDR_FILE" + $1 ~ qry { + printf "%s\t%s\n", $2, $1 + } +' $ADDR_FILE -- cgit v1.2.3