[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Ein bischen UNIX-Wahn !!! what-Kommando



Hallo Guido,

und auch für alle anderen, die es interessiert,
zur Vervollständigung die man-Auszüge für "what"
in seinen UNIX-derivatsabhängigen Ausprägungen.

Reliant UNIX sagt folgendes:

$ uname -a
ReliantUNIX-N U9YTU 5.44 C1012 RM400 1/512 R10000

$man what                     


what(1)                                                             what(1)

NAME
     what - Dateien identifizieren

SYNTAX
     what [-s] [--] Datei...

BESCHREIBUNG
     what durchsucht die angegebenen Dateien nach jedem Vorkommen des
     Musters, das get(1) für %Z% einsetzt [zur Zeit @(#)] und gibt die dar-
     auffolgenden Zeichen bis zum ersten ", >, Neue-Zeile-Zeichen, \ oder
     NULL-Zeichen aus.

     Wenn beispielsweise das C-Programm in der Datei f.c folgende Anwei-
     sungszeile enthält:

          #ident "@(#)Identifikationsinformation";

     und f.c so übersetzt wurde, daß f.o und a.out erstellt wurden, gibt
     das Kommando

          what f.c f.o a.out
 what: 'h' fuer Hilfe, 'q' zum abbrechen, oder <space> fuer mehr:
                                                             
     folgendes aus:

          f.c:   Identifikationsinformation

          f.o:   Identifikationsinformation

          a.out: Identifikationsinformation

     what wird zusammen mit dem SCCS-Kommando get verwendet, das automa-
     tisch Identifikationsdaten einfügt. Es kann jedoch auch verwendet wer-
     den, wenn die Identifikationsdaten auf andere Art (z. B. mit einem
     Editor) eingefügt wurden.

     Die Option hat folgende Bedeutung:

     -s   Suche beenden, sobald das Muster zum ersten Mal gefunden wurde.

     --   Ende der Optionenliste. Die Angabe ist nötig, wenn der erste
          Dateiname mit - beginnt.

ENDESTATUS
     Wenn das gesuchte Muster gefunden wird, ist der Endestatus 0, andern-
falls 1.

INTERNATIONALE UMGEBUNG
     Die Sprache der Meldungstexte wird durch die Umgebungsvariablen
     LC_ALL, LC_MESSAGES oder LANG bestimmt.

Seite 1                      Reliant UNIX 5.44                Gedruckt 8/98

what(1)                                                             what(1)

     In der Standardeinstellung verhält sich das System so, als wäre es
     nicht internationalisiert, d. h. die Meldungstexte erscheinen in eng-
     lischer Sprache. Wenn Sie die Sprache der Meldungstexte ändern wollen,
     müssen Sie eine dieser Variablen entsprechend setzen.

     Ausführliche Informationen zu den Abhängigkeiten der Umgebungsvaria-
     blen und zur Internationalisierung im allgemeinen finden Sie im Hand-
     buch "Leitfaden für Programmierer: Internationalisierung - Lokalisie-
     rung". Zur Einstellung der Benutzerumgebung siehe auch environ(5).

SIEHE AUCH
     get(1), help(1), mcs(1).




HP-UX sagt:

$ uname -a
HP-UX U9YYT B.11.11 U 9000/800 117470512 unlimited-user license
$ man what

 what(1)                                                             what(1)

 NAME
      what - get SCCS identification information

 SYNOPSIS
      what [-s] file ...

 DESCRIPTION
      The what command searches the given files for all occurrences of the
      pattern that get(1) substitutes for %Z% (currently @(#) at this
      printing) and prints out what follows until the first ", >, new-line,
      \, or null character.  For example, if the C program in file f.c
      contains

           char ident[] = "@(#)identification information";

      and f.c is compiled to yield f.o and a.out, the command

           what f.c f.o a.out


           f.c:           identification information

           f.o:           identification information

           a.out:         identification information

      what is intended to be used in conjunction with the SCCS get command
      (see get(1)) which automatically inserts identifying information, but
      it can also be used where the information is inserted manually.

    Options
      what recognizes the following option:

           -s        Quit after finding the first occurrence of pattern in
                     each file.

 EXTERNAL INFLUENCES
    Environment Variables
      LC_CTYPE determines the interpretation of the pattern substituted for
      %Z% as single- and/or multi-byte characters.         
If LC_CTYPE or LC_MESSAGES is not specified in the environment or is
      set to the empty string, the value of LANG is used as a default for
      each unspecified or empty variable.  If LANG is not specified or is
      set to the empty string, a default of "C" (see lang(5)) is used
      instead of LANG.  If any internationalization variable contains an
      invalid setting, what behaves as if all internationalization variables
      are set to "C".  See environ(5).

 Hewlett-Packard Company            - 1 -   HP-UX Release 11i: November 2000

 what(1)                                                             what(1)

    International Code Set Support
      Single-byte and multi-byte character code sets are supported.

 DIAGNOSTICS
      Exit status is 0 if any matches are found, otherwise 1.  Use help for
      explanations (see sccshelp(1)).

 WARNINGS
      The pattern @(#) may occasionally appear unintentionally in random 
 Hewlett-Packard Company            - 1 -   HP-UX Release 11i: November 2000

 what(1)                                                             what(1)

    International Code Set Support
      Single-byte and multi-byte character code sets are supported.

 DIAGNOSTICS
      Exit status is 0 if any matches are found, otherwise 1.  Use help for
      explanations (see sccshelp(1)).

 WARNINGS
      The pattern @(#) may occasionally appear unintentionally in random

 SEE ALSO
      get(1), sccshelp(1).

 STANDARDS CONFORMANCE
      what: SVID2, SVID3, XPG2, XPG3, XPG4

 Hewlett-Packard Company            - 2 -   HP-UX Release 11i: November 2000 




AIX sagt:

[root@U9YUU] / $ uname -a
AIX U9YUU 3 4 002023007900
[root@U9YUU] / $ man what


what Command

Purpose

Displays identifying information in files.

Syntax

what [ -s ] File ...

Description

The what command searches specified files for all occurrences of the pattern
that the get command substitutes for the %Z% keyletter (see the get or prs
command for a description of identification keywords). By convention, the value
substituted is "@(#)" (double quotation marks, at sign, left parenthesis, pound
what command reads from standard input.

The what command writes to standard output whatever follows the pattern, up to
but not including the first double quotation mark ("), greater than symbol (>),
new-line character, backslash (\), or null character.

The what command should be used in conjunction with the get command, which
automatically inserts the identifying information. You can also use the what
command on files where the information is inserted manually.

    Note: The what command may fail to find SCCS identification strings in
    executable files.

Flags

-s Searches for only the first occurrence of the %Z% pattern.

Exit Status

This command returns the following exit values:

0 Any matches were found.      

1 Otherwise.

Examples

Suppose that the file test.c contains a C program that includes the line:
char ident[ ] = "@(#)Test Program";

If you compile test.c to produce test.o, then the command:
what test.c test.o

displays:
test.c:

Test Program

test.o:

Test Program

Files

/usr/bin/what Contains the what command.                                                                                                     
Test Program

test.o:

Test Program

Files

/usr/bin/what Contains the what command.
Related Information

The get command, sccshelp command.

The sccsfile file format.

List of SCCS Commands in AIX General Programming Concepts: Writing and Debugging
Programs.

Source Code Control System (SCCS) Overview in AIX General Programming Concepts:
Writing and Debugging Programs.
-------------------------------------------------------------------------------


Viel Erfolg und Grüße

Christoph Walther

mailto:christoph.walther@t-systems.de






Reply to: