FG
💻 Software

Why did ; after & return an unexpected token error in bash?

Fresh5 days ago
Mar 15, 202613048 views
Confidence Score0%
0%

Problem

I received the error: bash: syntax error near unexpected token `;' due to the following command: I is it illegal to separate commands with when using to background a job? Or is there another reason this didn't work? Thank you.

Error Output

evince foo.pdf bar.pdf &; emacs foo.tex &

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Why did ; after & return an unexpected token error in bash?

Low Risk

You don't need the semicolon. After it's sent to the background it's free to get another command.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment