Questions tagged [escaping]

42 questions
78
votes
3 answers

Escape Skype Messages to Use Special Character Combinations

In a technical environment it's more than common to copy/paste configuration files, URLs, code samples and such in order to inform the other chat participant about something. In that case all kinds of combination of characters may be used, even ones…
sjngm
  • 2,143
25
votes
2 answers

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…
DASKAjA
  • 842
22
votes
1 answer

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 on: root@sv01:~# echo -e "\ Hello!" \…
13
votes
6 answers

where is the '^]' character on an azerty keyboard?

I am currently using telnet and i need to do an escape character (SMTP), where is this character on an azerty keyboard? (linux ubuntu).
Sylario
  • 945
11
votes
1 answer

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 "$@" (passing the arguments invoked on the bash script…
xomm
  • 331
10
votes
2 answers

How to transmit locally entered modifier keys or shortcuts to the remote desktop via VNC? Mask or escape them somehow?

I am connected to a xmonad desktop but am only able to use the first workspace. How can I change to other workspaces? Furthermore: If the last terminal is closed, I can’t do anything. How can I open a new terminal? The problem is, that my local…
erik
  • 2,028
6
votes
2 answers

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 curl interprets commas as multiple files to upload,…
Tyilo
  • 2,845
6
votes
1 answer

How can I single-quote or escape the whole command line in Bash conveniently?

Introduction Consider a tool like watch that can take another command (e.g. ls -l) like this: watch ls -l # or equivalently watch 'ls -l' If the command is more complicated, it's all about quoting/escaping if things like $variable, *, |, ; or &&…
4
votes
1 answer

grep fails in upstart script

I have an upstart configuration for a service which needs to check the existance of a process on it's startup. This sounds fairly easy but I'm already trying for 3 hours to get this thing solved and I'm lost. The problem seems to be that some grep…
3
votes
1 answer

unexpected EOF while looking for matching `)'

I get this error bash on my virtual hosting, in cron tasks. My command is following: /usr/bin/mysqldump --user=USERNAME --password="C\(mRA0_ifmv\(" DATABASE > ROOTFOLDER/backup/$(date +%F).sql && gzip ROOTFOLDER/backup/$(date +%F).sql I hid real…
3
votes
1 answer

why is it true that three backslashes are needed on windows for sed replace

Refering to this question: Why is an extra \needed in cmd.exe to work with sed (MinGW msys-1.0) when \ is not a special character according to cmd /? (see last paragraph or here)? The following special characters require quotation marks: & < > […
panny
  • 675
3
votes
2 answers

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 network as a parameter, and tries to connect the…
nvja
  • 175
3
votes
2 answers

Transferring environment variable through SSH / quoting in bash/sh/csh/tcsh

I want to transfer an environment variable over SSH. The "correct" way is using SendEnv/~/.ssh/environment, but that requires the server to support AcceptEnv or PermitUserEnvironment, which it does not in my case. So instead I am thinking to set the…
Ole Tange
  • 5,099
3
votes
2 answers

Display unescaped URLs in the Chrome address bar

I have whitespaces in some local files. Is there a possibility, for example an addon, to change the way the URLs of such files are represented in Chrome’s address bar? For example instead…
user281997
2
votes
1 answer

Echo string in tcsh with special characters escaped

Is it possible to echo out a string in tcsh such that it is fully escaped, as tcsh would understand? In the same way as printf %q works in bash: % # Create a variable containing a tab character % MYMONKEY=$'my\tmonkey' % printf %q…
1
2 3