Skip to content

Instantly share code, notes, and snippets.

@jessebutryn
Created December 6, 2019 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessebutryn/6465201ab873c98bbbfc870b19ad3d29 to your computer and use it in GitHub Desktop.
Save jessebutryn/6465201ab873c98bbbfc870b19ad3d29 to your computer and use it in GitHub Desktop.
================================================================================
Command: [[ foo ]] && echo bar
Shell: /bin/bash
Version: 3.2.57(1)-release
--------------------------------------------------------------------------------
bar
real 0m0.004s
user 0m0.001s
sys 0m0.002s
--------------------------------------------------------------------------------
exit code: 0
================================================================================
================================================================================
Command: [[ foo ]] && echo bar
Shell: /bin/csh
Version: 6.21.00
--------------------------------------------------------------------------------
[[: Command not found.
real 0m0.010s
user 0m0.003s
sys 0m0.005s
--------------------------------------------------------------------------------
exit code: 1
================================================================================
================================================================================
Command: [[ foo ]] && echo bar
Shell: /bin/ksh
Version: 93u+
--------------------------------------------------------------------------------
bar
real 0m0.004s
user 0m0.001s
sys 0m0.002s
--------------------------------------------------------------------------------
exit code: 0
================================================================================
================================================================================
Command: [[ foo ]] && echo bar
Shell: /bin/sh
Version: bash: 3.2.57(1)-release
--------------------------------------------------------------------------------
bar
real 0m0.005s
user 0m0.002s
sys 0m0.003s
--------------------------------------------------------------------------------
exit code: 0
================================================================================
================================================================================
Command: [[ foo ]] && echo bar
Shell: /bin/tcsh
Version: 6.21.00
--------------------------------------------------------------------------------
[[: Command not found.
real 0m0.010s
user 0m0.003s
sys 0m0.005s
--------------------------------------------------------------------------------
exit code: 1
================================================================================
================================================================================
Command: [[ foo ]] && echo bar
Shell: /bin/zsh
Version: 5.7.1
--------------------------------------------------------------------------------
bar
real 0m0.008s
user 0m0.002s
sys 0m0.004s
--------------------------------------------------------------------------------
exit code: 0
================================================================================
================================================================================
Command: [[ foo ]] && echo bar
Shell: /usr/local/bin/bash
Version: 5.0.2(1)-release
--------------------------------------------------------------------------------
bar
real 0m0.005s
user 0m0.002s
sys 0m0.002s
--------------------------------------------------------------------------------
exit code: 0
================================================================================
================================================================================
Command: [[ foo ]] && echo bar
Shell: /opt/pkg/bin/bash
Version: 4.4.12(1)-release
--------------------------------------------------------------------------------
bar
real 0m0.007s
user 0m0.002s
sys 0m0.003s
--------------------------------------------------------------------------------
exit code: 0
================================================================================
================================================================================
Unable to determine dash version
Command: [[ foo ]] && echo bar
Shell: /usr/local/bin/dash
Version:
--------------------------------------------------------------------------------
/usr/local/bin/dash: 1: [[: not found
real 0m0.005s
user 0m0.001s
sys 0m0.002s
--------------------------------------------------------------------------------
exit code: 127
================================================================================
================================================================================
Command: [[ foo ]] && echo bar
Shell: /usr/local/bin/fish
Version: 3.0.2
--------------------------------------------------------------------------------
fish: Unknown command '[[ foo ]]'
fish:
[[ foo ]] && echo bar
^
real 0m0.014s
user 0m0.008s
sys 0m0.005s
--------------------------------------------------------------------------------
exit code: 127
================================================================================
================================================================================
Command: [[ foo ]] && echo bar
Shell: /usr/local/bin/pwsh
Version: 6.2.0
--------------------------------------------------------------------------------
At line:1 char:2
+ [[ foo ]] && echo bar
+ ~
Missing type name after '['.
At line:1 char:11
+ [[ foo ]] && echo bar
+ ~~
The token '&&' is not a valid statement separator in this version.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingTypename
real 0m0.492s
user 0m0.474s
sys 0m0.086s
--------------------------------------------------------------------------------
exit code: 1
================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment