-1

A list is a sequence of one or more pipelines separated by one of the operators ‘;’, ‘&’, ‘&&’, or ‘||’, and optionally terminated by one of ‘;’, ‘&’, or a newline.

I can't find an explanation, what does semicolon (;) do after the last command. For instance, what's the difference between the following two commands:

a;b;c

a;b;c;

?

SantaXL
  • 355
  • 1
  • 15
  • 2
    A `;` at the end of a command does nothing. Well, it acts as a command terminator, just like newline does. There is no difference between the two lists of commands that you show. – Kusalananda Nov 19 '19 at 22:20

1 Answers1

1

The final semicolon is entirely optional. If it is there it does nothing differently than if it is not.

lbutlr
  • 737
  • 9
  • 26