I'm trying to complete a script and I cannot manage to find how to assign the machine hostname to a variable. The google is not much help either. The script goes something like:
This does not work and host name is not being stored in the $node variable. How can I do this?
Code:
: ${node='uname -n'}
: ${app_log_file="/var/log/app/${node}.log"}