1

I'm trying to use paste with some " and \, but can't seem to get the character string correct.

Desired output:

echo -n "\end{document}"

Using paste:

paste0("echo -n \"'\end{document}\'")

But I get:

Error: '\e' is an unrecognized escape in character string starting ""echo -n \"'\e"

thelatemail
  • 91,185
  • 12
  • 128
  • 188
Vedda
  • 7,066
  • 6
  • 42
  • 77
  • 9
    you also need to escape the escape `paste0('echo -n "\\end{document}"'); cat('echo -n "\\end{document}"')` – SymbolixAU Jan 19 '17 at 01:28

0 Answers0