xecho is a simple command line tool that prints the arguments it receives to stderr and then exits successfully. It is useful for troubleshooting command-line tokenization quirks in cmd.exe, WSL, MSYS2, Git Bash, PowerShell, and Cygwin.
It has two usage forms:
Prints the raw command-line as reported by GetCommandLine(). The printf format used in this case is:
"xecho [%s]\n"
Where %s
is the string from GetCommandLineW
(or GetCommandLineA
, depending on how the executable was compiled).
Prints the arguments as tokenized by the C runtime and passed to main(argc, char** argv). The printf format of each argv string is:
"xecho argv[%d]=[%s]\n"
Where %d
is the zero-based index i
into argv and %s
is the value of argv[i]
.