The whence Command

   

Korn Shell: Unix and Linux Programming Manual, Third Edition, The
By Anatole Olczak

Table of Contents
Chapter 9.  Miscellaneous Commands


The whence Command

The whence command is used to display information about a command, like if it is an alias, built-in Korn shell command, function, reserved Korn shell word, or just a normal Unix command. The format for the whence command is:

 whence name 

or

 whence  v name 

where name is the command or whatever you want to get information about. Here, the whence command shows that history is set to fc l:

 $ whence history  fc  l 

The v option causes more information to be provided about the command. Now we see that history is an exported alias:

 $ whence  v history  history is an exported alias for fc  l 

and until is a keyword:

 $ whence  v until  until is a keyword 

For compatibility with the Bourne shell, a preset alias type is set to whence v.

 $ type md  md is an exported function 

       
    Top
     



    Korn Shell. Unix and Linux Programming Manual, Third Edition
    Korn Shell. Unix and Linux Programming Manual, Third Edition
    ISBN: N/A
    EAN: N/A
    Year: 2000
    Pages: 177

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net