<syntaxhighlight lang="bash">
$ sbatch --gpus 16 test.sh
Submitted batch job 461
</syntaxhighlight>
We can specify <code>sbatch</code> options inside our shell script instead using the following syntax:
<syntaxhighlight lang="bash">
#!/bin/bash
#SBATCH --gpus 16
echo "Hello, world!"
</syntaxhighlight>