The semicolon (;
) can be used to separate multiple commands to be executed in order.
True or False?
- True
- False
Answers Explanation & Hint:
The semicolon ( For example: echo "Hello"; date; ls -l In this example, three commands are separated by semicolons. The shell will execute them in the following order:
The semicolon allows you to chain together multiple commands on a single line, which can be useful for scripting or performing several operations in sequence. However, be mindful of the order of execution, as the commands are run one after the other without any condition or error handling. |