[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Declared Var Dynamic Initialization = No Return Code Back?
From: |
Adam Danischewski |
Subject: |
Declared Var Dynamic Initialization = No Return Code Back? |
Date: |
Tue, 12 Sep 2017 20:04:31 -0400 |
$>declare MYSTERY_CMD=$(which mystery) && echo "All set." || echo "Adding
to missing array ... "
All set.
$>MYSTERY2_CMD=$(which mystery2) && echo "All set." || echo "Adding to
missing array ... "
Adding to missing array ...
Declaring a variable doesn't seem risky enough to eat up the return code.
Is there a reason for this? I doubt that it would break anything to change.
It's a lot more intuitive and syntactically streamlined to check for
missing packages/software at the initial declaration as a sanity check.
- Declared Var Dynamic Initialization = No Return Code Back?,
Adam Danischewski <=