- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: difference between $? in shell and perl progra...
Operating System - Linux
1753974
Members
7080
Online
108811
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО08-12-2007 06:34 PM
тАО08-12-2007 06:34 PM
difference between $? in shell and perl programming
what is the difference between $? in shell and perl programming.Can u guide me to any links which tells more abt it.Thnks in advance.
- Tags:
- exit status
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2007 07:27 PM
тАО08-12-2007 07:27 PM
Re: difference between $? in shell and perl programming
Hey
Perl: (from http://www.sarand.com/td/ref_perl_reserve.html)
$? The status returned by the last pipe close, backtick ( `` ) command, or system() operator. Note that this is the status word returned by the wait() system call, so the exit value of the subprocess is actually ( $? >> 8 ). Thus on many systems, $? & 255 gives which signal, if any, the process died from, and whether there was a core dump.
Also: $CHILD_ERROR
Shell: (from http://snap.nlc.dcccd.edu/reference/sysadmin/julian/ch16/324-326.html)
$? Bourne or Korn shell: Return the exit status (in decimal) of the last command executed. Most commands return a zero exit status if they complete successfully; otherwise a non-zero exit status is returned. This variable is set after each command is executed.
C shell: Check to see if a variable of that name has been set.
Regards
p.s. I have assigned points to 4 of 33 responses to my questions. So, don't forget to assigne points...
Perl: (from http://www.sarand.com/td/ref_perl_reserve.html)
$? The status returned by the last pipe close, backtick ( `` ) command, or system() operator. Note that this is the status word returned by the wait() system call, so the exit value of the subprocess is actually ( $? >> 8 ). Thus on many systems, $? & 255 gives which signal, if any, the process died from, and whether there was a core dump.
Also: $CHILD_ERROR
Shell: (from http://snap.nlc.dcccd.edu/reference/sysadmin/julian/ch16/324-326.html)
$? Bourne or Korn shell: Return the exit status (in decimal) of the last command executed. Most commands return a zero exit status if they complete successfully; otherwise a non-zero exit status is returned. This variable is set after each command is executed.
C shell: Check to see if a variable of that name has been set.
Regards
p.s. I have assigned points to 4 of 33 responses to my questions. So, don't forget to assigne points...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2007 09:38 AM
тАО08-14-2007 09:38 AM
Re: difference between $? in shell and perl programming
> [...] (in decimal) [...]
Really? Amazing.
Really? Amazing.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP