- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- what's the difference of 'which' and' whence'?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2004 09:19 PM
10-24-2004 09:19 PM
is it not product a new subprocess ,
while which produce a new subprocess ,because
'which' is a os command?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2004 09:36 PM
10-24-2004 09:36 PM
SolutionYes. 'Whence' is built-in command to Korn Shell and can recognize aliases in addition. "which" is a command and runs as a seperate process.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2004 10:52 PM
10-24-2004 10:52 PM
Re: what's the difference of 'which' and' whence'?
whence is a shell built-in and is normally set as alias for type (whence -v)
which is a process (/usr/bin/which)
Because there's no manual for whence you can find some hints looking for man sh-posix
and then searching for whence
Regards
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2004 01:36 AM
10-25-2004 01:36 AM
Re: what's the difference of 'which' and' whence'?
which is a system binary used to locate system's routines or binaries location by searching PATH locations.
Both of the binaries are using to search shell environment variable PATH.
By default, built-in binaries associated with shells will not fork a sub-process. But which is not related to shell so it will fork a new process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2004 01:50 AM
10-25-2004 01:50 AM
Re: what's the difference of 'which' and' whence'?
whence - locate a command and describe its type
Without -v, whence writes on standard output an absolute pathname, if any, corresponding to name based on the complete search order that the shell uses. If name not found, then no output is produced.
If -v is specified, the output will also contain information that indicates how the given name would be interpretted by the shell in the current execution environment.
whence (AT&T Labs Research) 1999-07-07
author
David Korn
which - locate a program file including aliases and paths For each name given, which searches for the file that would be executed if name were given as a command, and displays the absolute path of that file. Each argument is expanded if it is aliased, and searched for along the user's path. Both aliases and path are determined by sourcing (executing) the user's .cshrc file.
which was developed by the University of California, Berkeley.
Rgds...Geoff