Skip to main content

Questions tagged [escape-characters]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

Passing `Set /p _var=/irc:` when used by findstr, the colon does not get processed the same as if I typed `findstr /irc:` Example provided

I have search through the undocumented 'findstr' thread, SS64 findstr-escapes as well as SS64, Escape Characters for how to include the colon in the following way; no luck with either. Example batch ...
query-01's user avatar
1 vote
0 answers
139 views

How to properly escape in windows command shell - even the asterisk?

By following good (though sometimes conflicting) advice such as Quotes, Escape Characters, Delimiters - Windows CMD - SS64.com or Escape character – Wikipedia, section 2.6 Windows_Command_Prompt or ...
Hagen von Eitzen's user avatar
0 votes
1 answer
58 views

Complex escape coding in a batch for-loop

Reference is made to https://superuser.com/a/1508668/1884857 In my code I have added Vomit IT's code into a for loop. However, the code stops at the line: ECHO [int]$Calculation.split("%MathType%&...
Fjorstut's user avatar
0 votes
0 answers
120 views

Auto apply backslash to pasted text in iTerm2, that contains '?' (indicator to the start of query string in URL)

Previously, I could paste a website URL (Ex. https://www.youtube.com/watch?v=VIDEO_ID) after copying from the browser URL section, onto iTerm2 window. It would escape the question mark and equal sign, ...
Kiran's user avatar
  • 158
1 vote
0 answers
313 views

how to escape inside reg.exe windows registry - strange behavior

Everybody say that \ works as an escape inside reg.exe like: The REG command will interpret \ as an escape for the character that immediately follows it. source but I found it not a full correct ...
Badr Elmers's user avatar
0 votes
1 answer
1k views

In powershell to treat string as raw sting

I have to go to this C:\Users\user\Documents\code\dart\learning_dart\bin\string_lerning\ directory in Powershell I can use cd C:\\Users\\user\\Documents\\code\\dart\\learning_dart\\bin\\...
user avatar
3 votes
1 answer
90 views

Windows cli elusive escape

After reading this question I found that while I know how to escape in linux/bash I did not fair so well in windows cmd/batch. Anyone know how to properly escape the windows version of the command ...
dtmland's user avatar
  • 2,813
0 votes
2 answers
2k views

How to escape "&" in Android ADB shell command?

Seeking help with how to escape "&" in ADB command line -- any guidance would be much appreciated! I am attempting to extract .epub book files from an Android tablet running B&N Nook ...
tbroad's user avatar
  • 1
-1 votes
1 answer
30 views

Deleting files that start with " or '

Sort of noob Linux user here. I would like to delete a number of files that are contained in a list. The files may contain spaces in their names. I can create a file that goes something like this: rm -...
jdog's user avatar
  • 1
6 votes
1 answer
1k views

Echo to clipboard with special characters

I believe I am using the commands correctly, but the clipboard is empty using the following: C:\Windows\System32\cmd.exe /c echo 28376^>1847|clip I believe the problem is the > which I am using,...
KenL's user avatar
  • 73
0 votes
1 answer
1k views

Escaping quotation marks in a bash script on macOS

I want to turn the following command: $ gdate --date='TZ="America/New_York" 1am' +"%a %F %H:%M %Z" into a script using parameters, such as: #!/usr/bin/env bash gdate --date='TZ=&...
Marek Kowalczyk's user avatar
0 votes
0 answers
2k views

How to Escape & (Ampersand) and @ (At Sign) in Batch File when Passing File Name to PowerShell via a For Loop in cmd on Windows 10

We are using a .cmd batch script in cmd on Windows 10 and Windows Server 2016/2019 with a "header" that copies the file to the %Temp% folder location and then requests administrative ...
Bonding for Today's user avatar
3 votes
1 answer
402 views

Include an "at" symbol ("@") in a text cell

I'm organizing some stuff in a spreadsheet. None of it should be interpreted as anything other than than text, but it does contain a lot of non-alphanumeric characters. If I include the character @ in ...
ShapeOfMatter's user avatar
-1 votes
1 answer
666 views

Windows 10, cmd start with & in the command path

I'm now using OneDrive for work. This has caused me some problems with a specific command that I have pined. The OneDrive path now contains spaces dashes and an ampersand. C:\Windows\System32\cmd.exe /...
Neil Cherry's user avatar
2 votes
2 answers
1k views

How to escape a character in Write-Output with Powershell?

I am searching for $software in a list with -Match "$software". I also want to Write-Output $software to the screen. In the case of Notepad++ I have to escape the second +. I've tried $...
OrigamiEye's user avatar
1 vote
1 answer
2k views

Passing list of file paths in variable as arguments to command

Scenario: kdialog --menu takes a list of strings of the form title element label element label .... Now, the issue with this is that spaces are used as delimiters. Let's say I have a string variable $...
sonofevil's user avatar
  • 127
0 votes
2 answers
5k 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 &...
mikewax's user avatar
1 vote
1 answer
664 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. ...
Caleb Stewart's user avatar
0 votes
1 answer
371 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 ...
jrpear's user avatar
  • 120
1 vote
1 answer
2k 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 ...
shiftdel's user avatar
  • 131
1 vote
1 answer
490 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 . ...
kraftydevil's user avatar
-1 votes
1 answer
1k 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. ...
Brian's user avatar
  • 1,011
1 vote
2 answers
8k 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 ...
Raj Narayanan's user avatar
1 vote
2 answers
2k 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@...
Gerardo Grignoli's user avatar
0 votes
1 answer
369 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\...
Supercreature's user avatar
0 votes
2 answers
4k 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 "...
drj's user avatar
  • 21
0 votes
2 answers
4k 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 ...
Atcold's user avatar
  • 317
0 votes
1 answer
180 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 '\...
Arch Stanton's user avatar
1 vote
1 answer
2k 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> # ...
xliiv's user avatar
  • 755
5 votes
1 answer
402 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-...
Sergei Morozov's user avatar
0 votes
1 answer
224 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 ...
Buh13246's user avatar
2 votes
4 answers
7k 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 ...
Gabriel's user avatar
  • 21
0 votes
2 answers
92 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 ...
Dirk Horsten's user avatar
2 votes
1 answer
258 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\]\#\...
Tim Hilt's user avatar
  • 237
2 votes
3 answers
6k 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 ...
Brad's user avatar
  • 6,212
2 votes
1 answer
209 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:\...
GreenGren's user avatar
3 votes
1 answer
1k 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\...
rookie's user avatar
  • 97
0 votes
1 answer
611 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"&...
Mumpitz's user avatar
2 votes
1 answer
963 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 ...
Aria Fathi's user avatar
0 votes
1 answer
41 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>\([^&...
enodmilvado's user avatar
0 votes
0 answers
4k 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&...
user2718671's user avatar
0 votes
1 answer
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 ...
Edward_178118's user avatar
4 votes
1 answer
4k 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 ...
J. Doe's user avatar
  • 461
1 vote
1 answer
1k 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 ...
Kirill's user avatar
  • 13
3 votes
2 answers
1k 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 ...
Accumulator's user avatar
1 vote
0 answers
87 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 ...
Matt Muggeridge's user avatar
22 votes
1 answer
17k 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 ...
Mohammed Noureldin's user avatar
0 votes
1 answer
82 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 -...
Linuxwhisperer's user avatar
1 vote
1 answer
311 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 ...
PReinie's user avatar
  • 79
1 vote
1 answer
2k 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 ...
user1319182's user avatar