mirror of
https://github.com/ellysh/bash-programming-from-scratch.git
synced 2026-01-26 07:43:42 +00:00
11 lines
139 B
Bash
11 lines
139 B
Bash
#!/bin/bash
|
|
|
|
declare -A array
|
|
|
|
while IFS=$'=' read -r name contact
|
|
do
|
|
array[$name]=$contact
|
|
done < "contacts.txt"
|
|
|
|
echo "${array["$1"]}"
|