Solved

Errorlevel - how to find it?

Posted on 1997-06-24
1
300 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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now