Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test1=`sed -i "/:@/c connection.url=jdbc:oracle:thin:@$ip:1521:$dataBase" $search`
- valid $test1
- function valid () {
- if $test -eq 1; then
- echo "OK"
- else echo "ERROR"
- fi
- }
- some_command
- if [ $? -eq 0 ]; then
- echo OK
- else
- echo FAIL
- fi
- some_command
- retval=$?
- do_something $retval
- if [ $retval -ne 0 ]; then
- echo "Return code was not zero but $retval"
- fi
- if some_command; then
- printf 'some_command succeededn'
- else
- printf 'some_command failedn'
- fi
- if output=$(some_command); then
- printf 'some_command succeded, the output was «%s»n' "$output"
- fi
- command && echo OK || echo Failed
- cd /nonexistant
- if [ $? -ne 0 ]
- then
- echo failed
- else
- echo success!
- fi
- command && echo $? || echo $?
Add Comment
Please, Sign In to add comment