The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
2answers
24 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 ...
0
votes
1answer
40 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 ...
-1
votes
1answer
46 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 ...
0
votes
1answer
56 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
13 views

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

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
108 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
26 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
63 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
101 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 ...
1
vote
2answers
23 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\';" >> ...
2
votes
2answers
219 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
187 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 ...
0
votes
1answer
2k 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
127 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
133 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 ...
2
votes
2answers
4k 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 ...
3
votes
3answers
366 views

Need to sed awk or grep output to extract strings

I have output which looks like this: "vancouver/news/vancouver-voices": { "status": 0, "time": 0, "timestamp": 1371298701 }, "vancouver/news/vancouvers-march-second-annual-success": { ...
1
vote
1answer
2k views

Upload a file with a comma in its name with curl

How can I upload a file named yes, this filename has a comma.txt with the cli curl? You would normally do this to upload a file with curl: curl --progress-bar -F "fileUpload=@filename.txt" However ...
2
votes
2answers
625 views

How can I add a folder containing a semicolon to the Windows PATH?

I noticed that the semicolon ; is a valid character for Windows (NTFS) file and directory names. The semicolon is, however, used as element delimiter for the PATH environment variable. Say I have a ...
1
vote
3answers
3k views

Copy multiple files via cp from a string

I'm trying to copy multiple files to a directory from within a shellscript. These files contain all sorts of "ugly" characters, such as whitespaces, brackets and what not else. However, I'm stuck when ...
1
vote
1answer
730 views

How to escape “-” in bash [duplicate]

Possible Duplicate: Unix tools: what if a file is named minus something? Please tell me how to escape this: [root@unix ~]# ./-sh -bash: ./-sh: Permission denied [root@unix ~]# chmod +x ...
3
votes
2answers
647 views

ash scripting: space-containing variable refuses to be grepped

I am trying to run the script listed at http://talk.maemo.org/showthread.php?t=70866&page=2 on its intended hardware, a Nokia Linux phone running BusyBox ash. The script receives the name of WiFi ...
1
vote
1answer
1k views

Generating the escape sequences for terminal by ahk

I am trying to make an ahk for putty to send the keycodes that I want for some key combinations in order for my program to work over terminal too. For this I have an ahk already with some key ...
1
vote
1answer
1k views

How do I export HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe with regedit from cmd.exe?

I am trying to export the registry key HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe but am unable to do so, probably because of the percent signs. I tried to escape the %-sign with a caret ...
14
votes
4answers
11k views

How do you escape apostrophe in single quoted string in bash?

I don't understand how bash evaluates escaping of apostrophe characters in single quoted strings. Here is an example: $ echo ''\''Hello World'\''' 'Hello World' # works $ echo '\'Hello World\'' ...
3
votes
1answer
3k views

How can I format this path to work as registry key value?

C:\Program Files (x86)\DotR\DotR.exe I know I need to escape the backslashes like C:\\Program Files (x86)\\DotR\\DotR.exe but it still doesn't work. Do I need to handle spaces and parens as special ...
4
votes
1answer
4k views

How to use awk separator of single quote?

I'd like to use awk to pull out information from SQL output like the following: (count(distinct serverclass)='2') And need to extract the number, which is 2 in this example. I'd like to do ...
1
vote
1answer
472 views

Why does gnome-terminal display a unicode escape character?

More specifically, in Vim if I press escape twice (and under some other circumstances too) I get this character appearing: http://www.fileformat.info/info/unicode/char/1b/index.htm It can be ...
1
vote
1answer
452 views

Using find and sed to rename several subfolders

What I am trying to do is rename folders that are anywhere in the current tree, not neccessarily directly in the working directory. What I need to do is: "A 1" becomes "A 01" "A 2" becomes "A 02" ...
1
vote
2answers
1k views

Escape sequences in virtual terminal

I need send next escape sequence through COM port. ^[[LD NOTE (from manual) Pressing "Ctrl-v", "Ctrl-[" on keyboard will generate the "^[" escape sequence. In some file systems, the escape ...
1
vote
1answer
391 views

“^@” characters shown in SSH connection from OS X to Linux server

When I SSH into a Linux server via iTerm on OS X, running a PHP script, there are some strange characters printed on the screen What is this ^@ representing? These characters are not generated ...
2
votes
2answers
3k views

Escaping %’s in file-/folder-names at the command-line

Does anybody of a way to access files and directories that have a % in their name (which is valid) from the command-line? Specifically, if there are two %’s and the text between them happens to ...
2
votes
2answers
337 views

xbindkeys escape quotes

How can I escape quotes in .xbindkeysrc commands? Neither of those work. "pacmd dump|awk --non-decimal-data '$1~/set-sink-volume/{system ("pacmd "$1" "$2" "$3+2500)}'" "pacmd dump|awk ...
2
votes
1answer
562 views

Display escape characters in tmux

I have a script on my mac that displays the battery level with some color output. The color is based on the battery leve. As the level goes to zero, the color goes from green to red: #!/bin/bash ...
2
votes
1answer
618 views

How to convert Windows newlines to Unix newlines when cutting and pasting into Putty window?

Working on Windows XP Notepad++ with Windows line endings. When copying and pasting multiple lines into Putty window (connected to Ubuntu machine), it sends weird control characters. How to convert ...
12
votes
1answer
3k views

How can I tell Vim to show ANSI escape codes properly?

I'm trying to view and edit a file in Vim, but this file has ANSI escape codes: ^[[1m[0.05s elapsed, 00:00:13 total]^[[0m How can I tell Vim to interpret them properly instead of just showing the ...
0
votes
2answers
898 views

How to convert Windows filenames (from a checksums.md5) to *nix notation so I can use it on my shell with md5sum?

I have some checksums.md5 verification files from an ntfs external drive, but using windows notation: \ instead of /, spaces between file names (not escaped), reserved shell characters (like (, &, ...
5
votes
1answer
872 views

Enabling Italics, Underline on Emacs, Xterm and Putty

I'm using a Ubuntu (11.04 Server Edition) virtual machine as my development environment. It doesn't have a desktop environment since I don't think its necessary and I want to keep it lightweight. I'm ...
3
votes
1answer
512 views

How to properly vim-escape a variable/register

For example, I want to highlight occurrences of the current yank register, i.e., :let @/=@" It works, unless @" has 'funny' stuff in it like backslash. I can do :let @/=escape(@", '\\') but ...
0
votes
2answers
1k views

Escaping exclamation mark in shell (negation for if/then construct)?

I often use this directly in a shell to test an outcome for scripting, and it works fine: $ if [ -d mydirectory ] ; then echo YES ; fi YES However, if I want to use the negation using exclamation ...
1
vote
1answer
157 views

How can I escape the key-modifier characters in Texter?

In Texter's script mode, the ! character is used to denote the Alt key. I want the script to actually type a ! character -- how can I escape this so it will work? In the text mode (not script ...
1
vote
1answer
404 views

How can I use Control+` (grave accent) as my escape character for screen?

I've been trying to think of an escape character to use for screen that isn't already used by any of the programs I use, and I've settled on Ctrl+`. The default Ctrl+a is unacceptable for me because ...
0
votes
2answers
6k views

What is the ^I character and how do I find it with sed?

I usually import data from csv files to MySQL, but my data provider leaves NULL entries as "", so I need to replace "" with "\N". This is easy enough with a script like for csvfile in *.csv do ...
1
vote
1answer
3k views

how do I open a file from bash when it contains brackets

A previous developer on my project created backup copies of files using the format "filename (date time).extension" even though the project was under SVN control (don't ask!!!). I now can't open ...
42
votes
5answers
112k views

How do I escape spaces in command line in Windows without using quotation marks?

For example what is the alternative to this command without quotation marks: CD "c:\Documents and Settings" The full reason I don't want to use quotation marks is that this command DOES work: ...
6
votes
3answers
3k views

How to escape file output for compatibilty with 'xargs'?

I have this command: find $1 | xargs touch But files with ' characters in their names fail with "xargs: unmatched single quote", and I guess other special characters would cause the same problem. ...
4
votes
2answers
2k views

get ubuntu terminal to send an escape sequence (control+shift+up)

This problem starts when I use emacs ( with -nw option). Let me first explain it. I tried to define hotkey (for emacs) as following (global-set-key [(control shift up)] 'other-window) but it ...
2
votes
1answer
2k views

How to correctly set GNU Screen to display currently running program in hardstatus

In bash, to display the name of the current program in the GNU Screen hardstatus line takes only two configuration lines. First, tell screen what the end of your prompt normally looks like, and supply ...
4
votes
3answers
2k views

How do I escape the string \" for command line in Windows?

For a script that compiles LaTeX for me, I have to send the string \" to the command line, within a string delimited by ". Example: >pdflatex "\IeC{\" o}" How do I escape the " in the middle? If ...
0
votes
1answer
262 views

remap gnu screen “other” window selection

In my .screenrc file, I have: escape \034\034 This remaps ^a to ^\. This works for switching windows when specifying the window number, such as ^\0 or ^\1 but the 'other' command is not available, ...