- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
the mklvars.sh script shipped with the Linux edition of the Intel compiler fails to work on zsh because it is sh incompatible: The use of [ "" == "" ] is incorrect and instead [ "" = "" ] must be used.
I had to patch that script to be able to use the environment script provided by the package.
Cheers,
Matthias
the mklvars.sh script shipped with the Linux edition of the Intel compiler fails to work on zsh because it is sh incompatible: The use of [ "" == "" ] is incorrect and instead [ "" = "" ] must be used.
I had to patch that script to be able to use the environment script provided by the package.
Cheers,
Matthias
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for letting us know.
I'll file a bug report about it.
Jennifer
I'll file a bug report about it.
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
According to man sh
According to man sh
CONDITIONAL EXPRESSIONS
Conditional expressions are used by the [[ compound command and the test and [ builtin commands to test file attributes and perform
string and arithmetic comparisons.
string1 == string2
True if the strings are equal. = may be used in place of == for strict POSIX compliance.
So, '==' is OK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, '==' is OK
Yes, but not if Zsh expects POSIX compliance or does not understand Bash extensions to sh.
Yes, but not if Zsh expects POSIX compliance or does not understand Bash extensions to sh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looking at "info Zsh" (Conditional Expressions) (zsh 4.2.6)
STRING = PATTERN
STRING == PATTERN
true if STRING matches PATTERN. The `==' form is the preferred
one. The `=' form is for backward compatibility and should be
considered obsolete.
Therefore, Zsh must workas sh and bash
STRING = PATTERN
STRING == PATTERN
true if STRING matches PATTERN. The `==' form is the preferred
one. The `=' form is for backward compatibility and should be
considered obsolete.
Therefore, Zsh must workas sh and bash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Zsh needs the == to be escaped (\=\=), which bash accepts but not sh.
There obviously is a problem for several users here, which has an easy solution: respecting POSIX compliance.
The single = works as expected in all three shells.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page