Hello mksh developer,

A customer of ours is currently in the process of migrating from legacy
ksh to mksh. Overall it's going well, however they have reported one
difference which causes trouble to them.

In mksh, "print -R" is not as close to "echo" as it was in original
ksh. Specifically, after "-R", mksh's print command keeps parsing the
command line in search of options, and stops as soon as it finds an
option it doesn't recognize. In contrast, echo and the orignal ksh's
print command with -R will simply print anything that doesn't look like
a supported option to them.

Example with the original ksh:

$ print -R -42
-42

Same example with mksh:

$ print -R -42
mksh: print: -4: unknown option

I looked at the mksh code and was able to modify the print_c function
to get mksh's print command to behave the same with -R as echo and the
original ksh print with -R. I have a patch ready. Are you interested in
it, or is the different behavior on purpose?

Thanks,
-- 
Jean Delvare
SUSE L3 Support

Reply via email to