[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] Proposed usage of $-
From: |
Mart Frauenlob |
Subject: |
[Help-bash] Proposed usage of $- |
Date: |
Sun, 13 Jan 2013 11:05:36 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 |
Hello,
I was wondering what the proposed usage of `$-' is?
I thought it will show me all current set flags, but it is excluding
some like posix.
The reason for this question is, that I wanted to detect if a script is
ran in posix mode. Detect that and print a warning.
But there doesn't seem to be a representation of -o posix|--posix in $-.
$ /opt/bash42/bin/bash +o posix -c 'echo $-'
hBc
$ /opt/bash42/bin/bash --posix -c 'echo $-'
hBc
Thanks for your help
Mart
- [Help-bash] Proposed usage of $-,
Mart Frauenlob <=
- Re: [Help-bash] Proposed usage of $-, Dan Douglas, 2013/01/13
- Re: [Help-bash] Proposed usage of $-, Chet Ramey, 2013/01/13
- Re: [Help-bash] Proposed usage of $-, Mart Frauenlob, 2013/01/14
- Re: [Help-bash] Proposed usage of $-, Greg Wooledge, 2013/01/14
- Re: [Help-bash] Proposed usage of $-, Chet Ramey, 2013/01/14
- Re: [Help-bash] Proposed usage of $-, Mart Frauenlob, 2013/01/14
- Re: [Help-bash] Proposed usage of $-, Chet Ramey, 2013/01/14