This has sort of been touched on in some other postings, but for path reasons I would like to avoid using a shell script and just use ImageMagick's (IM) convert command line executable directly from a \immediate\write18{...} in a macro command, but in my IM convert instructions I need to pass the % (ASCII 37) as part of a macro.
However I try to conceive of making a % - and I have tried numerous ways(!) I always end up getting the Latex code I am using for the % passed through to the command line.
The obvious one, \% goes to the shell as \% directly and that is the pattern followed by all other options.
What I obviously seem to need is some way to generate the ASCII or unicode for % and get that to the shell from LaTeX via \write18 or other.
Or have some sort of temporary suspension on the LaTeX usage of % so that it can be part of a \write18{} and not break the command as a comment starter, and so be passed with out needing to be LaTeX escaped first.

\makeatletter \immediate\write18{...\@percentchar ..}? – Ulrike Fischer May 05 '11 at 11:50#? I have tried\@sharpcharbut it does not exists. – kiss my armpit Nov 05 '13 at 17:01