What Does Semicolon Mean in Linux?

What Does Semicolon Mean in Linux?
Contents

you can put two or more commands on the same line separated by the semicolon. … All the commands will be executed sequentially waiting for each command to finish before starting the new one.

What does semicolon do in shell script?

A semicolon or ampersand ( ; or & ) in a shell script is a command terminator. You can’t use it if it doesn’t follow a command. ; means “run the preceding command in the foreground” and & means “run the preceding command in the background”. A newline in a shell script is a “weak” command terminator.

What does a semicolon mean in Bash?

When the shell sees a semicolon (;) on a command line, it’s treated as a command separator — basically like pressing the ENTER key to execute a command. … You’ll see all of them on the same command line and they’ll be grouped together in the history list (Section 30.7).

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.