Bug 1217271

Summary: [[ ]] causes bash to hiccup
Product: [openSUSE] openSUSE Tumbleweed Reporter: greg mott <novell>
Component: BasesystemAssignee: Dr. Werner Fink <werner>
Status: RESOLVED NORESPONSE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: novell
Version: CurrentFlags: werner: needinfo? (novell)
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description greg mott 2023-11-17 02:25:09 UTC
$ exec -cl /bin/bash --norc --noprofile
$ [[ x ]]
$ [[ ]]
$ [[ x ]]
bash: syntax error near unexpected token `x'

Looks like a bug to me.
Apparently [[ ]] evokes the bug, and the next use of [[ reports a syntax error

# inxi -bz
System:
  Kernel: 6.5.9-1-default arch: x86_64 bits: 64 Console: pty pts/9
    Distro: openSUSE Tumbleweed 20231108
Machine:
  Type: Laptop System: HP product: HP EliteBook 840 G3 v: N/A serial: <filter>
  Mobo: HP model: 8079 v: KBC Version 85.78 serial: <filter> UEFI: HP
    v: N75 Ver. 01.39 date: 04/16/2019
Battery:
  ID-1: BAT0 charge: 39.9 Wh (97.1%) condition: 41.1/41.1 Wh (100.0%)
CPU:
  Info: dual core Intel Core i5-6200U [MT MCP] speed (MHz): avg: 800
    min/max: 400/2800
Graphics:
  Device-1: Intel Skylake GT2 [HD Graphics 520] driver: i915 v: kernel
  Device-2: Cheng Uei Precision Industry (Foxlink) HP HD Camera
    driver: uvcvideo type: USB
  Display: server: X.Org v: 21.1.9 with: Xwayland v: 23.2.2 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915 resolution:
    1: 1366x768~60Hz 2: 1920x1080~60Hz 3: 1366x768~60Hz
  API: OpenGL v: 4.6 Mesa 23.2.1 renderer: Mesa Intel HD Graphics 520 (SKL
    GT2)
Network:
  Device-1: Intel Ethernet I219-V driver: e1000e
  Device-2: Intel Wireless 8260 driver: iwlwifi
  Device-3: Intel Bluetooth wireless interface driver: btusb type: USB
Drives:
  Local Storage: total: 232.89 GiB used: 226.23 GiB (97.1%)
Info:
  Processes: 338 Uptime: 2d 14h 32m Memory: available: 15.5 GiB
  used: 6.57 GiB (42.4%) Shell: Bash inxi: 3.3.27
Comment 1 Dr. Werner Fink 2023-11-17 13:01:16 UTC
Please try latest bash

 werner@noether:/usr/src/werner/bash/bash> exec -cl /abuild/oscbuild/standard/bin/bash --norc --noprofile
 bash-5.2$ [[ x ]]
 bash-5.2$ [[ ]]  
 bash: syntax error near `]]'
 bash-5.2$ [[ x ]]
 bash-5.2$ echo $BASH_VERSION 
 5.2.21(1)-release
 bash-5.2$
Comment 2 Dr. Werner Fink 2024-01-19 09:55:25 UTC
No answer yet