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,138     Votes:  3 
Tags: bash   syntax  
Link: 🔍 See Original Answer on Ask Ubuntu ⧉ 🔗

URL: https://askubuntu.com/q/982586
Title: line 56 syntax error: unexpected end of file
ID: /2017/12/02/line-56-syntax-error_-unexpected-end-of-file
Created: December 2, 2017    Edited:  December 5, 2017
Upload: April 8, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


You can run your script through shell checker:

$ shellcheck myscript
 
Line 7:
CIVIS(){ $e "\e[25l"}
^-- SC1009: The mentioned parser error was in this function.
       ^-- SC1073: Couldn't parse this brace group.
                    ^-- SC1083: This } is literal. Check expression (missing ;/\n?) or quote it.
 
Line 23:
         if [[$key = $ESC[A ]];then echo up;fi
            ^-- SC1035: You need a space after the [[ and before the ]].
 
Line 24:
         if [[$key = $ESC[B ]];then echo dn;fi;}
            ^-- SC1035: You need a space after the [[ and before the ]].
 
Line 42:
        if [[ $after -eq 0 ]] || [$before -eq $LM ];then 
                                 ^-- SC1035: You need a space after the [ and before the ].
 
Line 56:

^-- SC1056: Expected a '}'. If you have one, try a ; or \n in front of it.
^-- SC1072: Missing '}'. Fix any mentioned problems and try again.

$ 

As the shell checker tells us you need to change line 7 from:

CIVIS(){ $e "\e[25l"}

to:

CIVIS(){ $e "\e[25l";}
⇧ How can I reboot extra fast? Cannot suspend with NVMe M.2 SSD  ⇩