filter-key-value.sh
This file
Path
examples/filter-key-value.sh
13 lines · 207 bytes · Shell
Last changed by
Not known.
History of this fileTake it
1234567891011121314#!/bin/bash
export LIST=$(cat <<ENDCow:MooCat:MeowDog:WoofEND)
ANIMAL=$(echo "$LIST" | cut -d':' -f1 | gum filter)SOUND=$(echo "$LIST" | grep $ANIMAL | cut -d':' -f2)
echo "The $ANIMAL goes $SOUND"