Bash scripting know the result of a command.

Posted by Fork on Stack Overflow See other posts from Stack Overflow or by Fork
Published on 2010-05-29T15:44:20Z Indexed on 2010/05/29 15:52 UTC
Read the original article Hit count: 479

Filed under:
|
|

Hi,

I am writing a bash script to run an integration test of a tool I am writing.

Basically I run the application with a set of inputs and compare the results with expected values using the diff command line tool.

It's working, but I would like to enhance it by knowing the result of the diff command and print "SUCCESS" or "FAIL" depending on the result of the diff.

How can I do it?

© Stack Overflow or respective owner

Related posts about bash

Related posts about diff