Chet Ramey wrote:
That's fine -- if the error message points at the included file as "not
returning a > 'true' value.
It doesn't. It points to a conditional in the previous file.
Note that the error message wasn't generated by bash: you generated it
yourself based on $BASH_COMMAND and the
> > That's fine -- if the error message points at the included file as "not
> > returning a > 'true' value.
> >
> > It doesn't. It points to a conditional in the previous file.
Note that the error message wasn't generated by bash: you generated it
yourself based on $BASH_COMMAND and the various
Reference original problem:
- Begin File1 (sdf)
#!/bin/bash
_prgpth="${0:?}"; _prg="${_prgpth##*}"; _prgdr="${_prgpth%/$_prg}"
[[ -z $_prgdr || $_prg == $_prgdr ]] && $_prgdr="$PWD"
export PATH="$_prgdr
Chet Ramey wrote:
On 6/9/12 3:05 AM, Linda Walsh wrote:
To sum up ". sdf2" is returning 1
Bash considers . to be a simple command even though what's really
executed is [[ $# -ge 2 ]] && echo hello.
---
Right It's NOT a simple command.
To be clear: `.' is a shell builtin, with its
On 6/9/12 3:05 AM, Linda Walsh wrote:
>
>> To sum up ". sdf2" is returning 1
>> Bash considers . to be a simple command even though what's really
>> executed is [[ $# -ge 2 ]] && echo hello.
> ---
> Right It's NOT a simple command.
To be clear: `.' is a shell builtin, with its own seman
On Sat, Jun 9, 2012 at 10:05 AM, Linda Walsh wrote:
>
>
> Pierre Gaston wrote:
>>
>>
>>> trap backtrace ERR
>>> set -T
>>>
>>
>> To sum up ". sdf2" is returning 1
>> Bash considers . to be a simple command even though what's really
>> executed is [[ $# -ge 2 ]] && echo hello.
>
> ---
> Rig
Pierre Gaston wrote:
trap backtrace ERR
set -T
To sum up ". sdf2" is returning 1
Bash considers . to be a simple command even though what's really
executed is [[ $# -ge 2 ]] && echo hello.
---
Right It's NOT a simple command.
I am trapping on ERR, not 'anything' that
On Sat, Jun 9, 2012 at 4:01 AM, Linda Walsh wrote:
> File1:
> sdf:
> Ishtar:/tmp> more sdf
> #!/bin/bash
>
> _prgpth="${0:?}"; _prg="${_prgpth##*}"; _prgdr="${_prgpth%/$_prg}"
> [[ -z $_prgdr || $_prg == $_prgdr ]] && $_prgdr="$PWD"
> export PATH="$_prgdr/lib:$_prgdr:$PATH"
> shopt -s expand_alias
File1:
sdf:
Ishtar:/tmp> more sdf
#!/bin/bash
_prgpth="${0:?}"; _prg="${_prgpth##*}"; _prgdr="${_prgpth%/$_prg}"
[[ -z $_prgdr || $_prg == $_prgdr ]] && $_prgdr="$PWD"
export PATH="$_prgdr/lib:$_prgdr:$PATH"
shopt -s expand_aliases extglob sourcepath ; set -o pipefail
. backtrace.shh
. sdf2
---