Bailey’s Big List of Escape Characters and Sequences

Escaping special characters is generally pretty straight forward, just throw the correct character in front of the problem, and it should solve itself. Sometimes it gets a bit weird though, and also sometimes it is difficult to find the correct way of doing something. I plan for this to be a live document that I update as I find things, so it will start small and grow. Feel free to comment below if you have something to add.

Nagios

Nagios has a mix of standard and weird escape sequences, and little documentation on how to handle them. As I come across each type, normal and strange, I’ll list them here.

Desired ResultEscape Sequence
Standard escape\
;\;
!\!
$$$

Batch

Definitely fewer weird situations than Nagios, but it does have a few that took a bit to find the solution to.

Desired ResultEscape Sequence
% in a string
%%
> in a for loop^>

PowerShell

PowerShell enjoys being different and that applies to it’s escape character as well.

Desired ResultEscape Sequence
Standard escape` (Grave/back tick)

Golang

Desired ResultEscape Sequence
Literal string“ (Grave/back tick) 
Standard escape\

About: Bailey Kasin

I build virtual environments and challenges for Cybersecurity students to complete as a way to gain experience before graduating and entering the workforce.


One thought on “Bailey’s Big List of Escape Characters and Sequences”

Leave a Reply

Your email address will not be published. Required fields are marked *