Pointers in Bash Shell Scripts
Categories :
Tags: Best Posts
# foo=bar
# name=foo
# echo ${!name}
bar
The above example shows how to make a bash environment variable reference the value of another.
# echo ${!f*}
foo fs_abc_opts fs_name
The above example shows how to get a list of all variables beginning with “f” (NB the wildcard can only go at the end).
Related posts:
- Heartbeat service scripts A service script for Heartbeat needs to support at least...
- configuring a Heartbeat service In my last post about Heartbeat I gave an example...
- Xephyr As part of my work on Xen I’ve been playing...