case | dash | bash | mksh | zsh | osh | description |
0 | pass | pass | pass | pass | pass | ${##} |
1 | pass | pass | pass | pass | FAIL | ${###} |
details | ||||||
2 | pass | pass | pass | pass | FAIL | ${####} |
details | ||||||
3 | pass | pass | pass | pass | FAIL | ${##2} |
details | ||||||
4 | pass | pass | BUG | pass | FAIL | ${###2} |
details | details | |||||
5 | pass | pass | pass | pass | FAIL | ${1####} |
details | ||||||
6 | pass | pass | pass | pass | FAIL | ${1#'###'} |
details | ||||||
7 | ok | N-I | N-I | ok | pass | ${#1#'###'} |
details | details | details | details |
29 passed, 2 ok, 2 known unimplemented, 1 known bugs, 6 failed, 0 skipped
osh | 1 ${###} [osh stdout] Expected b'25\n', got b"<core.base.ParseError object at 0x7f02a607a908>\nLine 2 of '<stdin>'\n echo ${###}\n ^\n---\n<core.base.ParseError object at 0x7f02a607a7b8>\nLine 2 of '<stdin>'\n echo ${###}\n ^\n---\n<core.base.ParseError object at 0x7f02a607a8d0>\nLine 0 of '<unknown>'\n <token had no position info>\nNO COL\n---\n" stdout: <core.base.ParseError object at 0x7f02a607a908> Line 2 of '<stdin>' echo ${###} ^ --- <core.base.ParseError object at 0x7f02a607a7b8> Line 2 of '<stdin>' echo ${###} ^ --- <core.base.ParseError object at 0x7f02a607a8d0> Line 0 of '<unknown>' <token had no position info> NO COL ---stderr: Expected } after length expression, got (token id:VOp1_Pound val:"#" span_id:15) Error reading command word Error parsing AndOr in ParseCommandTerm |
osh | 2 ${####} [osh stdout] Expected b'25\n', got b"<core.base.ParseError object at 0x7f406b495940>\nLine 2 of '<stdin>'\n echo ${####}\n ^~\n---\n<core.base.ParseError object at 0x7f406b4957b8>\nLine 2 of '<stdin>'\n echo ${####}\n ^~\n---\n<core.base.ParseError object at 0x7f406b495908>\nLine 0 of '<unknown>'\n <token had no position info>\nNO COL\n---\n" stdout: <core.base.ParseError object at 0x7f406b495940> Line 2 of '<stdin>' echo ${####} ^~ --- <core.base.ParseError object at 0x7f406b4957b8> Line 2 of '<stdin>' echo ${####} ^~ --- <core.base.ParseError object at 0x7f406b495908> Line 0 of '<unknown>' <token had no position info> NO COL ---stderr: Expected } after length expression, got (token id:VOp1_DPound val:"##" span_id:15) Error reading command word Error parsing AndOr in ParseCommandTerm |
osh | 3 ${##2} [osh stdout] Expected b'5\n', got b"<core.base.ParseError object at 0x7f6998f30908>\nLine 2 of '<stdin>'\n echo ${##2}\n ^\n---\n<core.base.ParseError object at 0x7f6998f307b8>\nLine 2 of '<stdin>'\n echo ${##2}\n ^\n---\n<core.base.ParseError object at 0x7f6998f308d0>\nLine 0 of '<unknown>'\n <token had no position info>\nNO COL\n---\n" stdout: <core.base.ParseError object at 0x7f6998f30908> Line 2 of '<stdin>' echo ${##2} ^ --- <core.base.ParseError object at 0x7f6998f307b8> Line 2 of '<stdin>' echo ${##2} ^ --- <core.base.ParseError object at 0x7f6998f308d0> Line 0 of '<unknown>' <token had no position info> NO COL ---stderr: Expected } after length expression, got (token id:Unknown_Tok val:2 span_id:15) Error reading command word Error parsing AndOr in ParseCommandTerm |
mksh | 4 ${###2} stdout: 25stderr: |
osh | 4 ${###2} [osh stdout] Expected b'5\n', got b"<core.base.ParseError object at 0x7f89cfbf0908>\nLine 2 of '<stdin>'\n echo ${###2}\n ^\n---\n<core.base.ParseError object at 0x7f89cfbf07b8>\nLine 2 of '<stdin>'\n echo ${###2}\n ^\n---\n<core.base.ParseError object at 0x7f89cfbf08d0>\nLine 0 of '<unknown>'\n <token had no position info>\nNO COL\n---\n" stdout: <core.base.ParseError object at 0x7f89cfbf0908> Line 2 of '<stdin>' echo ${###2} ^ --- <core.base.ParseError object at 0x7f89cfbf07b8> Line 2 of '<stdin>' echo ${###2} ^ --- <core.base.ParseError object at 0x7f89cfbf08d0> Line 0 of '<unknown>' <token had no position info> NO COL ---stderr: Expected } after length expression, got (token id:VOp1_Pound val:"#" span_id:15) Error reading command word Error parsing AndOr in ParseCommandTerm |
osh | 5 ${1####} [osh stdout] Expected b'##\n', got b'UNDEFINED\n\n' stdout: UNDEFINEDstderr: |
osh | 6 ${1#'###'} [osh stdout] Expected b'#\n', got b'UNDEFINED\n\n' stdout: UNDEFINEDstderr: |
dash | 7 ${#1#'###'} stdout: 4stderr: |
bash | 7 ${#1#'###'} stdout: stderr: /bin/bash: line 2: ${#1#'###'}: bad substitution |
mksh | 7 ${#1#'###'} stdout: stderr: /bin/mksh: <stdin>[2]: ${#1#"###"}: bad substitution |
zsh | 7 ${#1#'###'} stdout: 1stderr: |