People who code: we want your input. Take the Survey

Questions tagged [escape-characters]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
50 views

sed cannot interpret a literal hyphen

I'm using sed on a command line to edit a file. This works: sed "1,/abc/d" file1.txt > file2.txt It excises everything in file1.txt up to and including the abc. But this doesn't: sed &...
0
votes
1answer
42 views

Ctrl-V in TTY not escaping Ctrl-C

For the record, this has nothing to do with copying and pasting, which is likely why it's so difficult to find an answer. I am attempting to insert a literal CTRL-C character into a stream from a TTY. ...
0
votes
1answer
16 views

How can I view the control sequences that my terminal is outputting in text form?

I have a terminal graphical error I need to troubleshoot, and I'm not sure what the right tools for doing this are. I'm imagining my workflow will look something like: turn on terminal recording ...
1
vote
1answer
83 views

window batch) escaping special characters in 'for' sentence

I symplified my problem here: @echo off for %%a in (& ? !) do echo %%a pause>nul I want it to just print & ? ! but it doesn't work that way and rather takes an error I know that the ...
1
vote
0answers
66 views

Unable to delete hidden files starting with “._”, containing special characters

The file name is ._03 Überlin.mp3, and it lives in a folder on a Western Digital NAS external drive, being accessed on a Mac: $ ls -al total 128 drwxrwxr-x@ 1 kraftydevil staff 264 Jul 23 03:58 . ...
-1
votes
1answer
202 views

Escaping parenthesis in PowerShell Invoke-Expression

Below is a one-line script I am writing that is causing problems when I try to add an open-paran within invoke-expression. Within the script, the file map.txt contains 800 lines of 3 digit numbers. ...
1
vote
2answers
1k 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
299 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
96 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
2answers
520 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
2k 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
1answer
57 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
822 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
157 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
57 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
5k 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
67 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
104 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
3k 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
99 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
736 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
404 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
164 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
3k 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
2k 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
767 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
468 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
68 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
11k 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
160 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 ...
10
votes
1answer
7k 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
1k 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
711 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
451 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: ...
6
votes
2answers
10k 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
4k 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
242 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
101 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
517 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
1k 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 ...