GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: let under kornshell
Operating System - HP-UX
1848939
Members
7945
Online
104039
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
Forums
Discussions
Discussions
Forums
Discussions
back
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
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
10-14-2000 11:51 PM
10-14-2000 11:51 PM
let under kornshell
Does anybody know why the command line herebelow sends a SIGERR under HPUX/9000 kornshell ?
let k=1-1
example:
--------
#!/bin/ksh
trap 'echo SIGERR detected $?' ERR
let k=2-1
let k=1-1
let k=1-2
let k=1-1
example:
--------
#!/bin/ksh
trap 'echo SIGERR detected $?' ERR
let k=2-1
let k=1-1
let k=1-2
Move !
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2000 10:09 AM
10-15-2000 10:09 AM
Re: let under kornshell
Hi,
Because (extract from linux ksh manpage):
let [expression ...]
Each expression is evaluated, see Arithmetic Expressions above. If all expressions are successfully evaluated, the exit status is 0 (1) if the last expression evaluated to non-zero (zero).
So, exit status is 1 when result is 0, and since 1-1 equals 0 ...
Hope this helps,
Rik.
Because (extract from linux ksh manpage):
let [expression ...]
Each expression is evaluated, see Arithmetic Expressions above. If all expressions are successfully evaluated, the exit status is 0 (1) if the last expression evaluated to non-zero (zero).
So, exit status is 1 when result is 0, and since 1-1 equals 0 ...
Hope this helps,
Rik.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2000 10:24 AM
10-16-2000 10:24 AM
Re: let under kornshell
I still don't understand why it should send a SIGERR. One minus one or two minus two is clearly zero without error, and no one makes any mistake.
Unix is very bizarre, no wonder why Windows NT with its Visual Basic is progressing.
Unix is very bizarre, no wonder why Windows NT with its Visual Basic is progressing.
Move !
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.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP