what is the 'what' command on AIX under LINUX
I am used to use what to find out some version string in my 开发者_如何学Pythonprogram, which is normal defined as a string in the c++ code, starting with "@(#)".
Now I cannot find it in Linux. Can anyone tell me what I am supposed to do? Thanks a lot!
The what
command is part of the Source Code Control System (SCCS), which is not commonly available on Linux (if there is a Linux version at all). You can try to emulate it with the strings
command:
strings a.out | fgrep '@(#)'
Reimplementations of what
are available in CSSC (an SCCS-to-modern version control conversion package) and in BSD (source code).
try this
strings myprogram | grep '@('
As @larsmans said, what
command is part of SCCS. Here is the link to the GNU replacement for SCCS
Additionally to the mention of SCCS, ident
is the equivalent for RCS (and there are quite a few tools which use the same marker as RCS, CVS being the first one of these).
The following command gives most equivalent output compared to what
strings filename | grep -o \"\"@(#).*\"\" | sed 's/^\"@(#)//' | sed 's/\"$//'
精彩评论