look

find lines in a sorted file which begin with string 

Command


SYNOPSIS

look [-df] string [file]


DESCRIPTION

The look command lists the lines of the sorted search file which begin with string. The look command uses a binary search, so words may be quickly looked up in a large file such as a dictionary.

For the search to give the expected results, file must be sorted in the same way as the options indicate (see sort).

If you do not specify file on the command line, look uses a default file and assumes the -df options.

Options

-d 

treats only letters and digits as significant in the search.

-f 

ignores the case of letters in the search.


EXAMPLE

The command

look stead

lists all words in the default dictionary file that begin with the string stead.


ENVIRONMENT VARIABLES

DICTFILE 

contains the path name of the default dictionary. Since the default dictionary file is large, those users with a network file server may want to set this variable so that one copy of the file is shared.

ROOTDIR 

contains the path name of PTC MKS Toolkit's root directory on Windows systems.


FILES

ROOTDIR/etc/words 

If DICTFILE is not defined, this is the default search file. (See envvar).


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion (whether or not a match is found).

1 

Failure due to any of the following:

— invalid command line option
— too few command line arguments
— too many file names


PORTABILITY

Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025. 4.2 BSD UNIX.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
sort, spell

Miscellaneous:
envvar


PTC MKS Toolkit 10.5 Documentation Build 40.