CNWHUD/shell-frags/lookup_table.sh

14 lines
215 B
Bash
Raw Normal View History

function lookup_table_<thing>()
{
#Description: Lookup key value pairs in a text file
#Arguments:
#<thing>
#Returns/outputs:
#<value>
export <key>=$(grep $<keyname> <path to file> | awk -F ',' '{print $2}')
}