Metacharacters

Team-Fly    

Solaris™ Operating Environment Boot Camp
By David Rhodes, Dominic Butler
Table of Contents
Chapter 18.  NFS, DFS, and Autofs


Autofs provides a facility to allow metacharacters to be included within the mapsin 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

Metacharacter

Function

Example

&

Substitute the key

msmith neon:/export/home/&

*

Matches any key

* neon:/export/home/&

"

Escapes special characters

msmith 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 home directory, we could use the following:

 * neon:/export/home/& 

    Team-Fly    
    Top
     



    Solaris Operating Environment Boot Camp
    Solaris Operating Environment Boot Camp
    ISBN: 0130342874
    EAN: 2147483647
    Year: 2002
    Pages: 301

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net