commandArgs variable substring can only work if the splitCommands array length is greater than 1, otherwise an ArgumentOutOfRange exception occurs