mirror of
https://github.com/charmbracelet/gum
synced 2024-06-08 08:42:16 +02:00
bcfded82c8
fixing a here-document warning in the filter-key-value.sh script
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"
|