Questions tagged [escape-characters]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
125 views

Escaping a parenthesis in Powershell -Replace parameter not working

I want to rename files from this: Howard -((TV) )RED HEADED LEAGUE.mp4 to this: Howard - (TV) RED HEADED LEAGUE.mp4 Since the -Replace Powershell command uses regex regular expressions, I did this ...
1
vote
2answers
128 views

How to run CMD commands in powershell without escaping special chars?

I am trying to use PowerShell as my default shell, instead of cmd. But some trivial cmd commands are pre-processed by powershell and broken, for example: PS C:\git\myproject> git stash show stash@...
0
votes
1answer
59 views

How Do I Paste A Path Into Netbeans With Proper Formatting?

every time I past a file's path into Netbeans (for example, C:\programs\test.txt) I always have to add in the escape characters so that Netbeans understand the path. So, I will paste "C:\programs\...
0
votes
0answers
11 views

Write unicode char above other char

I've come across unicode combining chars like xͩ (U+0369). After seeing this, I want to write text over other text like this: xͩxͩxͩ. The problem is, that not every latin character has an associated ...
0
votes
2answers
168 views

Rename with a “/” in the name

I am trying to change a @ in the name to / for multiple files using cmd's ren command but couldn't as "/" is an identifier. None of the below worked... 1. ren TODAY@WEEK TODAY/WEEK 2. ren TODAY@WEEK "...
0
votes
2answers
701 views

Sending correct escape sequences in terminal

Issue To scroll a few lines up in WeeChat one is supposed to press <Alt> + <PgUp>. When I press these keys, the program thinks I'm pressing <Alt> + , instead. Debugging In my ...
0
votes
0answers
32 views

Escaping Single Quotes as Well as Dollar Signs in for ImageMagick Within PHP

I have an imagemagick convert command using captions like this: convert -size 100x100 -caption:"' . $mystring . '" I am having two cases where I am having issues when passing the string to the ...
0
votes
1answer
54 views

How to compare an escape sequence with a constant string?

I wanted to do a thing conditionally based on the background colour of my terminal, which I found out can be grasped by running printf '\e]11;?\a' In my case the output is stanton@mybox:~$ printf '\...
1
vote
1answer
460 views

How to escape quotes & (semi)colons in tmux bind-key?

I'd like to do something like this bind-key -T root ' <some-command> bind-key -T root " <some-command> bind-key -T root : <some-command> bind-key -T root ; <some-command> # ...
4
votes
1answer
146 views

Why does make ignore escape sequence if the output is piped

In a Makefile, I want to print a byte represented as a hexadecimal number and pass it to STDIN of another program. For some reason, it doesn't work: without-pipe: @printf '\x66\x6f\x6f' with-...
0
votes
1answer
35 views

Are there charsets which doesn't have Space at Code 0x20?

Are there other charsets besides EBCDIC that doesn't have the Code 0x20 for a space? I saw some programs which has the space hardcoded as 32. Should I always use escape sequences for spaces or is ...
2
votes
4answers
3k views

Excel adds quotation marks to the end of my formula

Excel automatically corrects my formula, saying "We found a typo in your formula and tried to correct it to:" =CONCAT(CHAR(34),A4,""":""",D4,"""") My original formula only has three quotation marks ...
0
votes
2answers
63 views

How to find a file path like `\\company\path` while in edit mode in a browser editor like confluence

When editing a page in confluence CTRL-f brings you to a find-and-replace dialogue instead of the find field of your browser. When filling in a file path in the find box of this dialogue, you don't ...
2
votes
1answer
84 views

What's wrong with this PS1-Prompt?

I was styling my PS1-Prompt to resemble the iPython-Prompt as: PS1FIRSTLINE="\[\n\][\t] \[\e[1m\e[38;5;196m\]\u@\H\[\e[0m\] in \[\e[1m\e[38;5;196m\]\w\[\e[0m" PS1SECONDLINE="\n\e[92m\]In [\[\e[1m\]\#\...
1
vote
3answers
2k views

Inserting \r\n into parameter on Windows

I'm using FFmpeg on Windows where I need to insert an \r\n in a parameter itself. ffmpeg … -headers "X-Test: Test\r\nX-Test-2: Test 2\r\n" … While this will work fine under Linux and such, it does ...
2
votes
1answer
98 views

Masking Reserved Words in Windows Command Line

I have a Java program that I need to launch with a command like this: java -cp "some.jar;some2.jar" -Dsome.prop.dir=C:\somedir com.software.MainClass Now the issue here is the -Dsome.prop.dir=C:\...
3
votes
1answer
516 views

Query registry value that contains slashes

I am trying to grab the value of the registry key in serialcomm using this command: REG QUERY HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM which gives me: HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\...
0
votes
1answer
365 views

Proper escaping of Characters for Shell execution from ASP/VBScript

I am executing a curl call from ASP with the WScript.Shell Object. Set objCmd = objWShell.Exec("cmd.exe /c echo "&dataString&" | /path/to/curl --cacert '/path/to/cert/cacert.pem' -X POST"&...
2
votes
1answer
101 views

Write windows alt characters in cmd

I want to write a non-space wrap (it's not a full space, just a tiny space alike character) ALT + 0157. The problem is in windows its ok I can rename a file and add that character to it but in cmd, it ...
0
votes
1answer
36 views

Variable printed the expected value but actually its value is different

The following syntax used in order to capture the word between <Name> in .xml file. I also use xargs to remove any spaces. $> var=` find /tmp -name '*.xml' -exec sed -n 's/<Name>\([^&...
0
votes
0answers
2k views

How to escape password in plink sudo command?

When trying to login with plink to a server I don't know how to pass the sudo password in the command correctly. I use something like this: plink -ssh -t <user>@<server> -pw <password&...
0
votes
1answer
1k views

Backslash escape for single quote in sed produces an error

The intention is to insert right after the HEAD Google tag code in a legacy HTML website. #!/bin/bash find . -type f -iname "*.php" -or -iname "*.htm" -or -iname "*.html" | while read i; do echo ...
3
votes
1answer
2k views

Rewrite a call to su-exec with su or similar?

In this bash script under Linux Alpine they have (line 8): exec su-exec "$ZOO_USER" "$0" "$@" As far as I know, su-exec is however an Apache httpd dependecy - can I avoid it installing it under ...
1
vote
1answer
681 views

Watch + pipe + multiple arguments

I have a command diff -y <(xxd FILE) <(xxd FILE_) | colordiff and i want to put it into watch routine. Something like that: watch -n 0,1 'diff -y <(xxd FILE) <(xxd FILE_)' But i have an ...
3
votes
2answers
281 views

Shell sometimes fails to output ESC ^[ character before escape sequence

Occasionally, when pressing an arrow key (usually up) inside of a shell, the terminal or shell fails to output an ESC character before the escape sequence, so if I press the up arrow to try and see ...
1
vote
0answers
64 views

Configure keyboard codes on the client-side to move PuTTY cursor between words

Related to StackOverflow Bash CTRL to move cursor between words/strings. While that thread provided good answers on the server-side, I'm looking for ways to control this on the client-side. I have ...
20
votes
1answer
8k views

Why does `echo -e “\\\SOME_TEXT”` show only one backslash?

Could some one explain what is happening behind the scenes in character escaping in Linux shell? I tried the following and googled a lot, without any success in understanding what (and how) is going ...
0
votes
1answer
46 views

Finding directories which files explicitly contain escape signs like ] , - Space all together

I have several video files, which contain escape characters like [ in combination with [1920x1080]. When I execute: find /run/media/user/usbdisk -type f -iname [HD, 1920x1080] - Wild Wild West.mp4 -...
1
vote
1answer
136 views

How does one italicize code with backslashes in these forums?

I looked through some of the formatting posts on this site but didn't find an answer (or in my case one that worked or made sense not understanding those posters' contexts). I even did a separate ...
0
votes
0answers
1k views

Escaping “new line” character in SRT file

I'm trying to display "\n" in an .SRT file, but VLC automatically interprets it as a carriage return, though I want to display it in a raw way. I've tried combinations like "\\n" or adding quotes, but ...
9
votes
1answer
6k views

How to escape “$@” in a makefile?

test: @echo "#!/bin/bash\njava -classpath \"$(CLASSPATH)\" com.atm.ATM \"$@\"" > test @chmod a+x test I am trying to escape the "$@" so that it literally appears in the "test" script as "$@...
1
vote
2answers
725 views

Powershell redirect to variable value containing colon

Is there a way to use a variable whose value contains the colon character as a filename string in a command-line redirect? Powershell always treats the colon as a drive separator, regardless of escape ...
1
vote
2answers
651 views

Ctrl-enter for fish shell

I had tried to create some accept completion and execute right away combination in fish on pressing Ctrl+Enter. function fish_user_key_bindings bind \c\n accept-autosuggestion execute end ...
2
votes
1answer
390 views

Script SSH Interactive Console that needs escaped chars

I would like to modify my existing SSH connection via a shell script. So if I run an existing script remotely I would like it to open a new port to be tunnelled. Interactively I can do this via: ...
5
votes
2answers
8k views

Escaping “=” (equal sign) in for /f

I'm trying to run the following command in a "FOR /F" in Windows' shell... wmic process where ParentProcessId=%%PID%% get ProcessId The = between ParentProcessId and %PID% keeps gettings replace by ...
2
votes
1answer
2k views

How do I find directories with a question mark in the name? Escaping not working?

I am try to find directories like services-client?.git using the command find . -name *\?.git but get all directories ending in .git What I'm doing is downloading a file from amazon s3 and in ...
0
votes
1answer
3k views

Escaping ampersand (&) in Windows batch script used to map/connect network drives

Using a simple batch file to connect to network drives on Windows start-up but one of the folder names contains an ampersand and I cannot for the life of me, figure out how to escape it. Here is the ...
1
vote
1answer
2k views

How do I escape a dot / period in bash string match

This is my first post, and I am really appreciating all the answers which helped me so far on that website, I hope this is not a redundant post, but I couldn't find something similar here. I try to ...
0
votes
1answer
42 views

For window 8.1 in my laptop keyboard constantly pressing the ESC? [duplicate]

For window 8.1 in my laptop keyboard constantly pressing the ESC? At time of writing or even in playing games. Even now I can't type, repeatedly ESC is being pressed automatically. I have tried ...
0
votes
1answer
1k views

Windows cmd: escape commands to start cmd from batch file, executing commands that add to PATH

I would like to that a cmd command prompt, which maps a network directory to a local path, and then adds that local path to the (local) PATH variable. I have prepared this kind of .bat script, which ...
1
vote
0answers
95 views

GNU-Screen super-key as escape

The super-key (windows key, et al) isn't representable using ascii or terminal escape sequences, so I doubt a tty-oriented utility like screen would support it, but does it? Can I use the super-key ...
3
votes
2answers
449 views

Treat part of a Regex expression as non-special characters

Let's say I've got a regex expression utilizing some of the special chars, but also a portion with 'normal' text that just happens to have some symbols in. Let's also say I'm too lazy to start ...
1
vote
1answer
1k views

Escaping asterisk * in Bash on Windows

The following command works in GNU Bash on FreeBSD but not in Git Bash on Windows: curl -X PUT https://example.com/_config/cors/origins -d '"*"' The intended result is to send a PUT request to https:...
1
vote
2answers
40 views

How do I output this line to a remote file?

I'm using a bash shell and trying to figure out the right way to write the following: ssh mysuer@remotehost 'echo "update user set url = \'localhost\' where url = \'mydomain.com\';" >> /tmp/db....
2
votes
2answers
1k views

tmux printing u'0x001b' and “]112” randomly

So I've lived with this problem for several weeks now, hoping that if I just let it happen enough, I would figure out the underlying trigger. No luck. tmux in bash in gnome-terminal in XMonad on ...
0
votes
2answers
984 views

cmd.exe escapes two quotes next to each other, even though my first quote is escaped by a caret

I am having troubles with quotes, I've been at this for hours... I basically have a external program (FOO) and it needs a string to process, and within that string there is a quote in the end and in ...
18
votes
1answer
25k views

How to escape “!” and “&” in docker's environment varibles

I have a docker container I want to run and hand it over some passwords. One with an exclamation mark ! and the other one with an ampersand &. So I want to run this: docker run -i -t --rm \ -e "...
1
vote
1answer
601 views

Vim cursor pauses when typing backslash

I use vim as my primary text editor, and one (seemingly) useless attribute is that when I type the \ character, the cursor doesn't move for a moment or until I type another character. Functionally, ...
0
votes
1answer
437 views

GNU Screen - String Escapes

Can somebody please explain or point me to good tutorial about "String Escapes" used in ~/screenrc. I am playing with $PS1 and ~/.screenrc. While $PS1 seems pretty clear (colors, conditions, escape ...
4
votes
2answers
12k views

Spaces in Linux environmental variables?

Given directory: /media/foo/can haz/bar, I have tried editing bash.rc with: export Foo=/media/foo/can haz/bar export Foo=/media/foo/can\ haz/bar export Foo='/media/foo/can haz/bar' export Foo="/media/...