# Shell scripting

### cheatsheets:
* [https://devhints.io/bash](https://devhints.io/bash)

### bash basics

`$?` last result

#### conditions

* check if file exists:
	```bash
    [ -f /path/to/file ] && do something
    if [ -f /path/to/file ]; then do something; fi
    ```

### find biggest folders of current directory
`du -hs * | sort -rh | head -5`