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,579     Votes:  1     ✅ Solution
Tags: command-line   bash  
Link: 🔍 See Original Answer on Ask Ubuntu ⧉ 🔗

URL: https://askubuntu.com/q/1196192
Title: syntax error near unexpected token `
ID: /2019/12/14/syntax-error-near-unexpected-token-_
Created: December 14, 2019
Upload: April 8, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


The command itself works fine:

$ for d in */; do echo "$d" ; done
subdir-A/
subdir-B/

However you have a hidden ' in front of the for command. Perhaps the file was copied from Windows. The easiest solution is to create a new test.sh file and copy the above command into it.

⇧ Upgrade or Fresh Install to Ubuntu 16.04 if I currently have Ubuntu 14.04 Package for reporting GUI problem in Ubuntu 19.10  ⇩