Writing a Script
Procedure
- Use PuTTY to log in to the server as the root user.
- Write a script.
- Open the script.
- Press i to enter the insert mode and add the following content:
#!/bin/bash #SBATCH -J slurmtest #SBATCH -o %J.out #SBATCH -e %J.err #SBATCH -N 1 #SBATCH --exclusive #SBATCH -p X86 for x in {0..10} do echo "This is a slurmtest for `arch`!" sleep 5 done - Press Esc, type :wq!, and press Enter to save the script and exit.
Parent topic: Common Script Operations