subshell term too much tricky
This commit is contained in:
+17
-2
@@ -7,11 +7,26 @@ readonly BASEDIR
|
||||
|
||||
# SCENARII
|
||||
|
||||
function do_pipe_error {
|
||||
function do_subshell_term {
|
||||
# grep nope nope
|
||||
echo "found=$(grep nope nope)"
|
||||
}
|
||||
|
||||
function do_last_false {
|
||||
# FIXME: provides error detection
|
||||
! true
|
||||
}
|
||||
|
||||
function do_unbound_associative {
|
||||
declare -A associative
|
||||
associative['A']='Abc'
|
||||
|
||||
# this is fine
|
||||
[[ -v associative['A'] ]] && echo "${associative['A']}"
|
||||
true
|
||||
[[ -v associative['B'] ]] && echo "${associative['B']}"
|
||||
|
||||
# this fails
|
||||
echo "${associative['B']}"
|
||||
}
|
||||
|
||||
function do_false {
|
||||
|
||||
Reference in New Issue
Block a user