lgram

A command-line utility for drilling Latin grammar.
Log | Files | Refs | README

commit 77089ef86db3a56977b5b81512c0a1ca8a1c0cb2
parent ce497a7d363633ac5510cbaf699606a53fe9cf7c
Author: Jared Tobin <jared@jtobin.io>
Date:   Sun, 24 Jul 2022 19:15:24 +0400

Filter via logical conjunction.

Diffstat:
Mconj | 8+++++---
Mdecl | 8+++++---
2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/conj b/conj @@ -432,10 +432,12 @@ prompt() { } IFS="|" -args="$*" -if [[ ! -z "$args" ]]; then - DATA=$(grep -E "$args" <<< "$DATA") +if [[ ! -z "$@" ]]; then + for arg in "$@"; do + echo $arg + DATA=$(grep -E "$arg" <<< "$DATA") + done if [[ -z "$DATA" ]]; then echo "no results" diff --git a/decl b/decl @@ -58,10 +58,12 @@ prompt() { } IFS="|" -args="$*" -if [[ ! -z "$args" ]]; then - DATA=$(grep -E "$args" <<< "$DATA") +if [[ ! -z "$@" ]]; then + for arg in "$@"; do + echo $arg + DATA=$(grep -E "$arg" <<< "$DATA") + done if [[ -z "$DATA" ]]; then echo "no results"