New answers tagged

9 votes
Accepted

difference ZSH and BASH for $RANDOM?

bash starts array indexes at 0, zsh at 1. One slightly strange-looking way to overcome this is server_list=(HPC1 HPC2) alias HPC='ssh -l username ${server_list[(($RANDOM % 2 - 2))]}' This puts the ...
user avatar
  • 86.5k

Top 50 recent answers are included