diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-12-06 20:58:18 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-12-06 20:58:47 +0100 |
commit | db7321af115a79b63267cb18889cbd334e8ca6e2 (patch) | |
tree | ec388295051ebc1f3d79bd3baf79b7f12f076cda /.local/bin/aqry | |
parent | f2fde1570a04a654e2ed0c165d56feb29ddb25bf (diff) |
scripts: Move many a script from sh to andy
Diffstat (limited to '.local/bin/aqry')
-rwxr-xr-x | .local/bin/aqry | 22 |
1 files changed, 10 insertions, 12 deletions
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 |