what program is designed to search in files for the
recognition string ‘@(#)’. All the strings it finds matching this
are printed on standard output.
The exit status of
what if zero is a matching string as found,
and 1 otherwise.
what [-s] [-V] file [file ...]
While the file is being edited (either at first or after ‘get -e’):-
#ifndef CONFIG_NO_SCCS_IDS static const char sccs_id = "%W%"; #endif
When the file is checked out for compiling (with
#ifndef CONFIG_NO_SCCS_IDS static const char sccs_id = "@(#)foo.c 1.3"; #endif
$ what foo foo: foo.c 1.3
If the executable is linked from several source files, you will get a line of output for each string containing the identification string ‘@(#)’. This is useful for finding out exactly what code went into an executable. This technique also works on object files, archive libraries, text files, and in fact any sorts of files at all.
strings command, there is no way to make
operate on standard input. The data would need to be written to a file
The rationale for the preprocessor construct
is that sometimes compilers or lint-pickers complain that the variable
sccs_id is unused, and defining
remove these ids and thus silence the warnings.