Skip to main content

Questions tagged [quoting]

Strings are typically delimited by quotes, which raises the problem of dealing with strings that include quotes.

3 votes
1 answer
117 views

$ wine cmd /c 'echo "hello world"' \"hello world\" Where do the backslashes come from? The command behaves differently in an interactive session: $ wine cmd Microsoft Windows 6.1....
finefoot's user avatar
  • 3,586
0 votes
2 answers
86 views

Logical way would be to use an 's/[\[\]]/_/g' regexp replace, however it does not work as intended to. It replaces a chain of [ and ] with a single _. $ echo 'x[]x'|sed -E -e 's/[\[\]]/_/g' x_x $ echo ...
peterh's user avatar
  • 10.5k
2 votes
1 answer
79 views

PROBLEM Hi, I'm trying to make a .desktop entry for jetbrains toolbox (a program), because for some reason, the desktop entry they included isn't showing the icon on my system (popOS 22.04, a Ubuntu ...
Action Jackson's user avatar
6 votes
2 answers
852 views

I'm writing an ansible playbook, which I'm fairly to. I'm having issues with ansible-playbook complaining about my quotes, which from my understanding are correct. I've tried 3 things described at the ...
jitter's user avatar
  • 117
2 votes
1 answer
83 views

I wrote an Ansible playbook to grab information from some YAML files and store it in a MariaDB database. It uses this Jinja SQL template: REPLACE INTO mytable(hostname,fqdn,owner, ...) VALUES {% for ...
dr_'s user avatar
  • 32.4k
2 votes
2 answers
179 views

There is an answer from SuperUser, which renames filenames containing whitespace: for f in *\ *; do mv "$f" "${f// /_}"; done The part I don't understand is *\ *. The author wrote ...
glacier's user avatar
  • 490
4 votes
1 answer
156 views

I have a command that produces a list of arguments, quoting then if neccesary (https://docs.python.org/3/library/shlex.html#shlex.quote). I need them to pass them as command arguments in a zsh script (...
Petr's user avatar
  • 1,776
-1 votes
1 answer
85 views

This command works as expected if I run it in the tmux command line: list-panes -a -F "pane ID: #{p3:pane_id} TTY: #{p11:pane_tty}" Output: pane ID: %1 TTY: /dev/pts/35 pane ID: %2 TTY:...
Hauke Laging's user avatar
  • 94.8k
0 votes
1 answer
120 views

Recently when I read one QA, it has some unexpected behaviors for me: ~/findtest % echo three > file\ with\ \"double\ quotes\" ~ % find findtest -type f -exec sh -c 'set -x;cat "{}&...
An5Drama's user avatar
  • 173
0 votes
2 answers
657 views

I ran pwd | pbcopy command in Terminal on my MacBook Pro to copy the working directory to the clipboard. The working directory looks like this: /Users/JohnSmith/PycharmProjects/100 Days of Code - The ...
sjl26916091's user avatar
1 vote
1 answer
139 views

As far as I know, a safe and portable filename can consists of aA-zZ 0-9 hyphen and underscore only. At the same time, if we move away from the safe file-naming practices, we can use characters such ...
jsx97's user avatar
  • 1,397
6 votes
3 answers
1k views

This problem is driving me crazy. From the command prompt I can enter this command and it works as expected (records where the INFO/RegionType tag contains the value Core are emitted in the output ...
mcrepeau's user avatar
0 votes
1 answer
587 views

I'm doing a Linux driver tutorial, and I have encountered a problem with the sample lesson of passing parameters to the driver.  I tried another parameter-passing example I found on the internet with ...
carlh's user avatar
  • 21
0 votes
3 answers
220 views

I have a long command and I just want to use alias to shorten it. But the command contains single quotes and exclamation marks. The origin command is ldapsearch -x -H ... -w 'abc!123'. I tried alias ...
Donghua Liu's user avatar
3 votes
1 answer
663 views

I wrote a script that needs to call a command and pass on arguments. My script has its own parameters but some need to be passed through. This fails when arguments to my script have spaces in them. ...
Ned64's user avatar
  • 9,304

15 30 50 per page
1
2 3 4 5
73