Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
bk glob(7.3.3)		    BitKeeper User's Manual		bk glob(7.3.3)

NAME
       bk glob - demo program to show glob pattern expansion

SYNOPSIS
       bk glob pattern string [string string ...]

DESCRIPTION
       Some  BitKeeper	interfaces  use	what are called	"glob patterns," some-
       times known as wild cards.  Examples include  the  configuration	 file,
       history listing (bk changes), and file name expansion (bk files).

       This command may	be used	to match a glob	against	one or more strings to
       see examples of how the pattern matching	works.

WILDCARD MATCHING
       A string	is a glob pattern if it	contains one of	 the  characters  "*",
       "?",  "[",  or sometimes	"=".  (The last	one, "=", is an	alias for "*",
       to avoid	shell quoting in many cases.  See CONFIGURATION	 below.)   The
       glob pattern is used to match one or more strings (or file names), usu-
       ally in a process that takes a glob pattern  and	 a  list  of  possible
       matches	and returns the	subset of the list which matches the glob pat-
       tern.  Matching works as	follows:

       ?      Matches any single character (unless "?" is between brackets).

       *      Matches any string (unless "*" is	between	brackets).

       [...]  A	set of characters enclosed in brackets matches a single	 char-
	      acter if and only	if the character is in the set.

       [^...] As  above	 but inverts the set.  In other	words "[^abc]" matches
	      any character except "a",	"b", or	"c".

CONFIGURATION
       It is possible to disable all use of globs in file  name	 expansion  by
       setting the environment variable	BK_NO_FILE_GLOB	to any value.

       Since  aliasing	"=" for	"*" is not a standard feature and it may cause
       problems	when processing	files with "=" as part of their	name, it  must
       be  explicitly	enabled	 by setting BK_GLOB_EQUAL to the value of YES.
       No other	value will enable this feature.

EXAMPLES
       Test a simple pattern match that	matches	file.c and file.h:

	   bk glob '*.[ch]' file.c file.h file.1

       List all	files ending in	".1":

	   export BK_GLOB_EQUAL=YES
	   bk -A files =.1

       See changes in all header files in the current directory:

	   bk diff '*.h'

       See the revision	history	for all	C/header files with the	phrase	"sccs"
       in their	name:

	   bk sccslog '*sccs*.[ch]'

       See all changesets which	include	the phrase "BUGID:" followed by	a num-
       ber:

	   bk changes '-/BUGID:[123456789]/'

BUGS
       Sets of characters, i.e., [A-Z],	have only marginal support.   Escaping
       the minus in the	set is not supported.

SEE ALSO
       bk-config-etc, bk-changes, bk-files

CATEGORY
       File
       Repository

BitKeeper Inc			     201E1			bk glob(7.3.3)

NAME | SYNOPSIS | DESCRIPTION | WILDCARD MATCHING | CONFIGURATION | EXAMPLES | BUGS | SEE ALSO | CATEGORY

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=bk-glob&sektion=1&manpath=FreeBSD+13.1-RELEASE+and+Ports>

home | help