Re: bash trap techniques for group-command in a pipeline

2011-05-24 Thread john.ruckstuhl
shellERRhandler ERR echo cmd2 echo "cmd3 (with exit code 6)"; myreturn 6 echo cmd4 } | tr a-z A-Z echo cmd5 Regards, John Ruckstuhl On Apr 2, 12:50 pm, "john.ruckstuhl" wrote: > Summary: I don't see the best way to (in bash) trap/handle

bash trap techniques for group-command in a pipeline

2011-04-02 Thread john.ruckstuhl
Summary: I don't see the best way to (in bash) trap/handle an ERR inside a group-command "{}" that is in a pipeline. I have a way that seems to work, see "(F)", but little confidence that it's the best way, and some suspicion that the overall effort is misguided. Detail: I'd like to trap and hand

comparison inside [[]] is not numeric comparison?

2010-12-09 Thread john.ruckstuhl
In bash, a comparison inside "[["/"]]" is lexicographic not numeric? This isn't what I expected. Which part of the documentation would set me straight? If someone could quote the fine manual, that would be great. $ if [[ 2000 > 200 ]]; then echo pass; else echo wierd; fi pass $ if [[ 1000 > 200