Unix/Linux Go Back    

RedHat 9 (Linux i386) - man page for lsearch (redhat section n)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

lsearch(n)			      Tcl Built-In Commands			       lsearch(n)


       lsearch - See if a list contains a particular element

       lsearch ?mode? list pattern

       This  command searches the elements of list to see if one of them matches pattern.  If so,
       the command returns the index of the first matching element.  If not, the command  returns
       -1.   The  mode	argument indicates how the elements of the list are to be matched against
       pattern and it must have one of the following values:

       -exact The list element must contain exactly the same string as pattern.

       -glob  Pattern is a glob-style pattern which is matched against each  list  element  using
	      the same rules as the string match command.

	      Pattern  is  treated  as a regular expression and matched against each list element
	      using the rules described in the re_syntax reference page.

       If mode is omitted then it defaults to -glob.

       list, match, pattern, regular expression, search, string

Tcl					       7.0				       lsearch(n)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 11:35 PM.