The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
2answers
357 views

rsync not removing single quotes around array of strings --filter list

Trying to safely retrieve files from heavily infected Windows XP and 2003 machines that came to us from an acquisition. I have a similar need for automating a script that would run on PXE booted ...
1
vote
2answers
313 views

How to escape spaces in Apache SetEnvIf value

I am trying to use SetEnvIf (Apache2, via a .htaccess file) to store an environment variable where the value to be assigned to the variable needs to contain spaces. For example, trying to set ...
2
votes
4answers
930 views

How to escape “/” in a sed command in Puppet script?

In a config file, I'm trying to replace PREFIX=/jenkins with, say, PREFIX=/foobar. On the (bash) command line, this works fine: sed -i.bak s/PREFIX=\\/jenkins/PREFIX=\\/foobar/g /etc/default/jenkins ...
0
votes
1answer
52 views

SSH hangs every time an escape character is transmitted

I've been asked to continue installation of a freshly installed Debian system. I can log in there through SSH with no problems. But the connection hangs every time the remote shell sends an escape ...
-2
votes
3answers
2k views

sed replace text - escape characters

I have a mysqldump file in which I want to replace the following text <a href="/tag/ with <a href="http://www.mydomain.com/tag/ but can't find a way to correctly escape all special characters. ...
2
votes
1answer
160 views

Executing bash code interactively using -c flag

I am trying to run a shell fragment with the bash interpreter. Using the -c flag allows me to provide the commands directly into command line without writing to a file. This is required for my usage. ...
4
votes
1answer
1k views

Apache mod_rewrite double encodes query string on redirect

We've encountered a strange issue (a bug, perhaps?) with Apache mod_rewrite's behavior when passing through query strings. To reproduce, we've set up a clean Ubuntu (oneiric) install with the default ...
2
votes
1answer
296 views

Escape sequence for the escape key

On an SSH terminal, there is a command that takes over the terminal window, and it says I can press escape to end it. My SSH terminal does not handle the escape key. What is the escape sequence ...
3
votes
3answers
3k views

How does one escape the “ ` ” (accent grave/backtick) in a path?

I tend to prefix oft-used files and folders with the "accent grave" character (non-shift tilde, the back-tick, or plain-old accent, whathaveyou..), as it is easy to get at, and let's me sort things ...
4
votes
2answers
718 views

How to escape or remove double quotes in rsyslog template

I want rsyslog to write log messages in JSON format, which requires to use double-quotes (") around strings. Problem is that values sometime include double-quotes themselves, and those need to be ...
1
vote
1answer
290 views

Printing a '$' (dollar sign) to a file

I want to echo/printf a dollar sign into a file - but echo $ > myfile or such does not work (not surprising). I tried escaping it like echo \$ > myfile but it is also not working. What is the ...
2
votes
1answer
612 views

DSGET escapes hash signs (#) in outputted Distinguished Names (DN)s but expects unescaped hash signs for input

Lets say I want to do the very simple query in AD dsquery user -name "John Smith" | dsget user -memberof -expand This will output the DNs of the AD groups that this user belongs to. I can make it ...
0
votes
1answer
96 views

Do modern mail servers still escape lines they think are headers?

For many years I have made it my practice to set up my e-mail clients so that when I forward e-mails I forward them as attachments rather than forwarding them "inline". I did this because, in the ...
7
votes
4answers
1k views

Searching for literal “> \” using ack-grep

I am looking for lines that literally have a greater than character (a ">") followed by a space followed by a backslash character (a "\") i.e., a line with this: > \ I thought escaping would allow ...
4
votes
3answers
174 views

run local MySQL instance for fast mysql_real_escape_string calls

Currently all MySQL data/API calls are handled by a remote DB cluster (i.e. network latency is a factor in total script execution time). To reduce execution time in this context, would it be sensible ...
0
votes
2answers
1k views

batch for loop with bracket in the command

I have a batch file with the following code: for /f "tokens=*" %%a in ('dir /b /a-d') do ( echo Processing %%a >>%LOG% dtsrun /S(local) /NNotesLoad /A"FilePath:8="%NOTESDIR%\%%a" ...