Inline Comments in Multiline PowerShell Commands and Scripts

Questions about the use of line continuation (\) together with inline comments (# comment) in shell scripts is a somewhat frequent topic on Unix and Linux forums. Unfortunately, there is no simple elegant solutions available for any of the standard shells such as bash, ksh93, zsh or the POSIX shell. Consider the following simple shell script: #!/bin/ksh93 find ./ \ -type f \ -name “*.pyc” Suppose you want to add comments describing each argument to the find utility. You might (I did the first time I came across this issue!) naively expect the following to work: #!/bin/ksh93 find ./ \