On Thu, Sep 16, 2021 at 08:47:32AM +0100, Jonathan Dowland wrote: > On Wed, Sep 15, 2021 at 02:01:23PM -0400, Greg Wooledge wrote: > > I don't know why there's a ";" in front of it. > > That's (part of) my shell prompt. It's a convention originating in the > rc shell (although I learned of it from another); it permits you to copy > and paste directly from the shell buffer if you want to repeat a > sequence of commands.
Unfortunately, it breaks in Bourne-family shells. unicorn:~$ ;true bash: syntax error near unexpected token `;' In Bourne/POSIX/bash, semicolon is a command terminator or separator, and may not appear by itself, or at the start of a command. It may appear at the end. Ksh seems to be an exception, and tolerates it at the beginning as well.