Slurm incorrectly padding unicode

Viewed 16

When submitting jobs with sbatch, I often like to put unicode characters in my job names. However, when this happens, it seems like sbatch things each unicode character is two characters long, even though in my Terminal it's displayed as one character. This causes the formatting to look strange:

enter image description here

Is there any way to make the character padding work better (without having to put the job name at the end of the line)? This is the squeue command that causes the issue:

squeue --user $USER --format '%10j %18i ...'
1 Answers

You can use the column command with the -t argument that will take care of unicode character alignment and make column widths dynamic:

$ squeue  --me --format "%30j %18i"
NAME                           JOBID
xxxxxxxxxxxxxx                 10797040
P6                             10797007
δ0.2_λ0.25                   10797003
$ squeue  --me --format "%30j %18i" | column -t
NAME            JOBID
xxxxxxxxxxxxxx  10797040
P6              10797007
δ0.2_λ0.25      10797003
Related