Questions tagged [escaping]

Escaping is the process of applying an alternate meaning to a character or set of characters.

Escaping is used for many purposes, such as providing representations of unprintable characters, changing font colors in terminals, or allowing the inclusion in a string of a character normally used to terminate the string, as well as allowing to output a character to user when that character can be used as a control or markup character.

Some of the more common uses of escaping

  • URL encoding to allow including characters such as / or ?, and others, in URL queries;
  • XML and HTML entities that can be used to encode special characters that, for example, would normally be used for markup purposes.
8924 questions
4
votes
0 answers

Akka: best way to escape/encode actor name?

Is is usually a great idea to give actors consise names to ease debugging. In my scenario I have to create lots of actors that take arbitrary short string in constructor and do something with it. I'd like to include this string into actor name in…
Eugene Loy
  • 12,224
  • 8
  • 53
  • 79
4
votes
4 answers

how to echo a double backslash plus a variable (version number) like "\\hostname\release\1.02A01" by using sh?

I want to echo a Windows shared folder address to users in a Linux shell script, the address are strings like this: \\hostname\release\1.02A01. and the last string(1.02A01) is a version number, it's changed each time when I run the script. I tried…
Bool.Du
  • 43
  • 1
  • 6
4
votes
1 answer

Python escape delimiter in configuration file using ConfigParser

I'd like to escape ":" and/or "=" as the name in a configuration file. Does anyone know how to achieve this? I try backslash "\", it does not work.
swimmingfisher
  • 901
  • 9
  • 9
4
votes
1 answer

Expanding double quotes escaped with three backslashes in bash?

Consider this bash example: TESTA="testing a \\\"string right here\\\"" echo $TESTA # testing a \"string right here\" The output is as expected: the first pair of backslashes resolved to a single backslash (\), and the next escaped double quote \"…
sdaau
  • 36,975
  • 46
  • 198
  • 278
4
votes
4 answers

Using a question mark as a String in android

Im trying to use a question mark as a variable for a string. I've tried... strings.xml \? .class String questionMark; questionMark = getResources().getString(R.string.questionMark); String delim4 =…
Billy Korsen
  • 524
  • 2
  • 6
  • 19
4
votes
2 answers

Escaping in rpm spec file

I am trying to set the rpath in my spec file with a statement like export LDFLAGS="-Wl-rpath=$ORIGIN/../lib" But I can't correctly escape "$ORIGIN". I need the command to gcc to contain the string "$ORIGIN", not expand it anywhere along the line. I…
pythonic metaphor
  • 10,296
  • 18
  • 68
  • 110
4
votes
2 answers

How to escape quotes for remote command via ssh command line

I'm having trouble issuing the following command on remote server. The | awk '{print $1}' did not appear to have any effect on the output. Am I incorrectly escaping the quotation characters? To make it worse, these two commands are actually…
user3388884
  • 4,748
  • 9
  • 25
  • 34
4
votes
3 answers

Avoiding escaping double quotes in a string

Is there a component of Python that allows me to bypass intermediate quotation marks? As in, can you dictate the master start and stop to a print call, so that everything in between the master start and stop is interpreted regardless of what that…
black_bird
  • 115
  • 1
  • 5
  • 12
4
votes
1 answer

JVM variables escape equals when running from command line

When running a Java application such as java -Dme.unroll.url=unroll.me?param=val -jar my.jar Does the = in param=val need to be escaped? This has been surprisingly hard to Google as most of the results are for escaping Unix shell special values. =…
djechlin
  • 59,258
  • 35
  • 162
  • 290
4
votes
1 answer

Is there a difference with the HTMLEditFormat function in ColdFusion CF9 versus CF10?

I'm seeing a difference in how HTMLEditFormat works in CF9 and CF10. HTMLEditFormat(">") In CF9: showing up as ">" (no difference) In CF10: showing up as ">" (double-escaped, which seems correct to me) I've looked through the CF10…
Luke
  • 18,811
  • 16
  • 99
  • 115
4
votes
1 answer

Unable to extract symbols from string

I am trying to use some specific symbols in a string. I need to loop through each character of the string and identify the symbols. However, certain symbols are getting converted to THREE CHARACTERS. Need help on how to retain the symbol. echo…
4
votes
2 answers

How to escape Jenkins parameterized build variables

I use Jenkins ver. 1.522 and I want to pass a long string with spaces and quotes as a parameter in the parameterized build section. The job only runs a python script. My problem is that I can't find a way to escape my string so that jenkins passes…
vinni_f
  • 622
  • 3
  • 15
  • 25
4
votes
1 answer

python compare "\n" escape chars with "\\n"

Ok, I have two strings, "Hello\nWorld!" and Hello\\nWorld!. I have to compare those that way that \n and \\n equals. Thats not hard. I just string1.replace("\n", "\\n"). But what if I have to do it right for all escape chars including unicode…
Hannes Karppila
  • 969
  • 2
  • 13
  • 31
4
votes
1 answer

How can I prevent parallel from adding extra escaping to my command?

I'm trying to get parallel to run a command and pass a date in quotes. But it's adding an extra backslash before the spaces in the parameter: $ echo "2014-05-01 01:00" | parallel --dry-run foo \"{}\" foo "2014-05-01\ 01:00" How can I get parallel…
Thomas Johnson
  • 10,776
  • 18
  • 60
  • 98
4
votes
2 answers

Bash - Escaping single quotes

I got a database script that searches for duplicate IDs, when given a certain ID, last name, and first-name. Here are the meat and potatoes of it: PSQL="psql -p $PGPORT -h $DBHOST -d $DB -tAc " DUP_ID=$($PSQL "SELECT id FROM inmate WHERE id NOT…
sirjames2004
  • 453
  • 2
  • 9
  • 18
1 2 3
99
100