# How can I read this script for submitting a jupyter-notebook server as a batch job?

I am totally new to Linux and writing bash scripts. In this tutorial, I found a script for submitting a jupyter-notebook server as a batch job. However, I cannot understand the script.

Can someone explains what each line of the script does? Any help will be appreciated!

#!/bin/bash
#SBATCH --partition general
#SBATCH --nodes 1
port=$(shuf -i8000-9999 -n1) node=$(hostname -s)
user=$(whoami) cluster=$(hostname -f | awk -F"." '{print \$2}')