Home » Linux SemiColon

Linux Semicolon (;)

you can put two or more commands on the same line separated by the semicolon. All the arguments before (;) will be treated as a separate command from all the arguments after the (;). All the commands will be executed sequentially waiting for each command to finish before starting the new one.

Syntax:

Example:

Linux semicolon

Look at the above snapshot. First we have used ‘ls’ and ‘echo’ command separately. Then we have used both of them in the same line separated by (;). In this case, both the commands are executed sequentially.

We have highlighted ‘a new line’ to show that it is printed just after the list.

Next TopicLinux Ampersand

You may also like