The (unofficial) documentation for the Windows Internal CMD ECHO shows some interesting tricks in it. However, I have not yet found a way to echo a single character.
Quick note, od used below, is from a Git (or Gow) installation
For instance, this echo's the 'a' with a 'windows' newline (\r\n):
>echo a| od -A x -t x1z -v -
000000 61 0d 0a >a..<
000003
And this trick (also in the docs now) echo's nothing:
><nul (set/p _any_variable=)| od -A x -t x1z -v -
000000
So I would expect this to echo just the 'a':
><nul (set/p _any_variable=a)| od -A x -t x1z -v -
000000 61 20 >a <
000002
But it adds the extra space at the end.
Is it possible to just do a single character?
@Aacini answered (the first question) correctly in a comment below, but in case he does not create an answer, here it is:
>set /P "=a" < NUL | od -A x -t x1z -v -
000000 61 >a<
000001
And are there any tricks to get more precise like the UNIX echo with a -n (no new line) and -e (use backslash interpretation) so I could similar outputs to this:
>unix_echo -n -e "a\n" | od -A x -t x1z -v -
000000 61 0a >a.<
000002