shell_match

shell_match --  compares string text to a pattern.

Syntax

shell_match (text, pattern)

		

Arguments

text

A text string to compare against the given pattern.

pattern

A shell style pattern.

Returns

t if the text matches the pattern, otherwise nil.

Description

This function compares the text to the pattern using shell-style wildcard rules. The available patterns are as follows:

Example

To get a directory listing of just *.txt files, use:

    shell_match(directory("/etc/readme",0,nil),"*.txt");

    Gamma> shell_match("hello","?el[a-m]*");
    t
    Gamma> shell_match("hello","hel{p,m,ga}");
    nil
    Gamma> 
    		

See Also

apropos

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.