https://drive.google.com/file/d/18Y6ffgUUSv_LCwaprXSe7ckYu3JlOcpC/view?usp=sharing

1. Sequential Execution with ;

Explanation

The semicolon (;) allows you to run multiple commands one after another, regardless of whether each command succeeds or fails. Commands execute sequentially (one at a time).

Syntax

command1; command2; command3

Examples

date; pwd; cal
echo Hello; echo World

Lab Steps

  1. Open a terminal.

  2. Run:

    date; pwd; whoami
    
    
  3. Observe that all three commands run in order, even if one fails.

Tips & Warnings


2. Background Execution with &

Explanation

The ampersand (&) runs a command in the background, allowing the next command to start immediately (in parallel). This is useful for long-running tasks.

Syntax