Solved

Errorlevel - how to find it?

Posted on 1997-06-24
1
318 Views
Last Modified: 2013-12-26
If a program exits on a errorlevel say of 1
How do you know? What program can you use to find the current errorlevel?
0
Comment
Question by:chiefarcher
1 Comment
 
LVL 1

Accepted Solution

by:
warren_dale earned 50 total points
ID: 1293717
Under the Bourne shell (at least), $? expands to the exit status of the last program. (Actually the most recent pipeline.) So we can say:
    cmp -s $ONE $TWO
    if [ $? -eq 0 ]
    then
        echo "$ONE and $TWO are identical"
    else
        echo "$ONE and $TWO are different"
    fi
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question