Remove trailing whitespace from commands as parameters
@@ -877,6 +877,13 @@ static FAR char *nsh_filecat(FAR struct nsh_vtbl_s *vtbl, FAR char *s1,
index += nbytesread;
}
+ /* Remove trailing whitespace */
+
+ for (;
+ index > s1size &&
+ strchr(g_token_separator, argument[index - 1]) != NULL;
+ index--);
+
/* Make sure that the new string is null terminated */
argument[index] = '\0';
