The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 2,418β€…    Votes:  2β€…
Tags: command-line   syntax   ksh  
Link: πŸ” See Original Answer on Ask Ubuntu ⧉ πŸ”—

URL: https://askubuntu.com/q/1153463
Title: Why is a blank required between "[[" and "-e xxx" in ksh?
ID: /2019/06/24/Why-is-a-blank-required-between-____-and-_-e-xxx_-in-ksh_
Created: June 24, 2019    Edited:  June 24, 2019
Upload: March 26, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


The space is a deliminator and is required. As you can see from shellcheck:

$ shellcheck gmail-browse-msgs-algorithm.sh

In gmail-browse-msgs-algorithm.sh line 847:
        [[$Today != "${DaysArr[ i + DAY_DELETED_ON_NDX ]}" ]] && continue
          ^-- SC1035: You need a space after the [[ and before the ]].

(Both ksh and bash support [[ and don’t work without the space. Shellcheck gives exactly that output with similar ksh and bash scripts containing that buggy line.)

Why deliminators are needed has to do with tokens and lexicons.

⇧ Linux keeps on Logging and freezing after entering password How to Auto-Arrange Desktop Icons?  β‡©