|
From: | Mart Frauenlob |
Subject: | Re: [Help-bash] Proposed usage of $- |
Date: | Mon, 14 Jan 2013 09:07:54 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 |
On 13.01.2013 20:40, Chet Ramey wrote:
On 1/13/13 1:38 PM, Dan Douglas wrote:- only contains the options representable by short option flags to set. The value you're looking for is in SHELLOPTS. [[ $SHELLOPTS == *posix* ]]. There are some extra differences depending upon how "POSIX mode" was set but most shouldn't have to worry about them (echo can be more or less strict for instance).The `posix' option is settable using `set -o', but there is no single- letter flag equivalent (-p and -P were already used).
Thank you guys for your replies. I wasn't aware of SHELLOPTS. Looks like the improved version of $-.May I suggest a small man page and `help set' update, as this 'short flags only' isn't mentioned in the descriptions of $- and set.
The particular script, which brought this all up for me, as it won't work in posix mode, quits on error on process substitution:
line 199: syntax error near unexpected token `<' line 199: ` done < <(some_command_generating_a_list)'not sure if it should be like that, but guess so (report it just for safety).
Best regards Mart
[Prev in Thread] | Current Thread | [Next in Thread] |