0

I have an associative array named table

declare -A table
table["apple"]="fruit"
table["tomato"]="veggie"
table["highway"]="GT"
table["artist"]="eminem"

Now say I have a variable returning the value highway

How do I find corresponding value GT ??

(this value that I find (GT in this case) is supposed to be the name of a mysql table)

Edited by Dani: Formatting fixed

2
Contributors
1
Reply
15
Views
4 Years
Discussion Span
Last Post by masijade
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.