mirror of
https://github.com/charmbracelet/gum.git
synced 2024-09-11 06:16:03 +03:00
14 lines
207 B
Bash
Executable File
14 lines
207 B
Bash
Executable File
#!/bin/bash
|
|
|
|
export LIST=$(cat <<END
|
|
Cow:Moo
|
|
Cat:Meow
|
|
Dog:Woof
|
|
END
|
|
)
|
|
|
|
ANIMAL=$(echo "$LIST" | cut -d':' -f1 | gum filter)
|
|
SOUND=$(echo "$LIST" | grep $ANIMAL | cut -d':' -f2)
|
|
|
|
echo "The $ANIMAL goes $SOUND"
|