what(1)

what1

Show what versions of object modules were used to construct a file

Usage

what [-qs] [file ...]

Overview

The what utility searches each specified file for sequences of the form “@(#)” as inserted by the SCCS source code control system. It prints the remainder of the string following this marker, up to a NUL character, newline, double quote, ‘>’ character, or backslash.

The following options are available:

-q

Only output the match text, rather than formatting it.

-s

Stop searching each file after the first match.

Exit status

Exit status is 0 if any matches were found, otherwise 1.

Releases

163 releases since Mac OS X 10.0; the text changed 2 times.

  1. 10.0–10.4.11
  2. 10.5–12.5
  3. 13.0–26.5

-q since macOS 13.0; -s since macOS 13.0.

Standards

The what utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”). The -q option is a non-standard FreeBSD extension which may not be available on other operating systems.

History

The what command appeared in 4.0BSD.

Bugs

This is a rewrite of the SCCS command of the same name, and behavior may not be identical.

From shell_cmds 329 in macOS 26.5. Parsed by carta from the page's mdoc source.