I have two functions that only store variables. Example:
Function datanode1(){
homedirectory = "/path/to/file"
ConfigDirectory = "/path/to/file"
user = "john"
max_open_Files = 262114
}
datanode2 is exactly the same, just different path files.
I would like to do something like this:
if [ "$a1" == "all" ]; then
for i in [datanode2, datanode1] do
*execute Script*
done
fi
Is this possible? How are the functions acting as arrays?
Function, butfunction. and not bothfunctionand(). Just usedatanote1() { ...; }var = valuebutvar=value-- see Shell Parameters and Simple Command Expansion