Files
bash-programming-from-scratch/manuscript/resources/code/BashScripting/while-contacts.sh
2020-10-17 10:22:39 +02:00

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"]}"