I was trying to run a script which is based on RHEL, within the script i have to add hostname of the same machine where the action need to be execute. For an example
wait /bin/sh -c “mkdir -p /tmp/hostname of the machine”
I am not sure how to bring hostname there which should be dynamic based on different machines?
Relevance substitution may be an easy way to do that. I don’t think $hostname variable would be accessible in the context that the action is running as.