You can use the value of an environment variable by prefixing a dollar sign ($) to its name. Braces can also be used to delimit the name of the variable from appended characters.
The environment variables can be inherited from the environment or defined explicitly with the -D option on the command line. For example, if you want each client to mount client-specific files in the network in a replicated format, you could create a specific map for each client according to its name, so that the relevant line for host oak would be:
/mystuff cypress,ivy,balsa:/export/hostfiles/oakand for willow:
/mystuff cypress,ivy,balsa:/export/hostfiles/willowThis scheme is viable within a small network, but maintaining this kind of host-specific map across a large network usually isn't feasible. The solution in this case would be to invoke the automounter with a command line similar to the following:
and have the entry in the direct map read:
/mystuff cypress,ivy,balsa:/export/hostfiles/$HOSTNow each host would find its own files in the mystuff directory, and the task of centrally administering and distributing the maps becomes easier.