Skip to content

Bash

Is a shell and programming language for Linux. See also PowerShell

Commands & Examples

  • # Comments

File & Data

Check if file exists

#!/bin/bash
if [ -e x.txt ]
then
    echo "ok"
else
    echo "nok"
fi

Time

Wait N seconds

sleep 10 to wait 10 seconds