O'Reilly logo

Solaris™ Operating Environment Boot Camp by Dominic Butler, David Rhodes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Metacharacters

Autofs provides a facility to allow metacharacters to be included within the maps—in the same way that the shell allows them within its syntax. Table 18.10 shows the ones that are available, along with an example of how they may be used.

Table 18.10. Metacharacters
MetacharacterFunctionExample
&Substitute the keymsmith neon:/export/home/&
*Matches any key* neon:/export/home/&
"Escapes special charactersmsmith neon:/”some location”

For example, we can see that most lines in the auto_home map are the same, apart from the user name. Using metacharacters, we could shorten the auto_home file to the following:

testuser neon:/export/home/&
sysadmin neon:/export/home/&
msmith   neon:/export/home/&
jgreen   neon:/export/home/&

Or to match every ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required