Save output of "ls" or other command to shell variable
It is very useful to be able to store the output of a command to a shell variable for use in a script. This can be achieved as follows: shellVariableName=$(COMMAND) Note that there is no space between the shellVariableName and the =, and the