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
161 views

According to the Shell Command Language Specification: "2.7.4 Here-Document": Any <backslash> characters in the input shall behave as the <backslash> inside double-quotes (see 2....
13 votes
1 answer
2k views

% echo -e '1\n2' | parallel "bash -c 'echo :\$1' '' {}" :1 :2 % echo -e '1\n2' | parallel bash -c 'echo :\$1' '' {} % I'd expect the second line to act the same.
2 votes
2 answers
264 views

I am trying to auto-generate tab-completions for different commands. I am piping man pages for different commands into awk, then searching for command line options (eg. -shortopt --long-option) ...
0 votes
2 answers
96 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 ...
3 votes
1 answer
145 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....
4 votes
3 answers
15k views

I read strings from stdin and I want to display the users that match the strings. Problem is, if the user inputs the character '[', or a string containing it. grep -F does not work because the line ...
1 vote
1 answer
149 views

I'd like to use nullmailer to have my Debian (bullseye and bookworm) systems send system-generated email messages to the appropriate recipient. nullmailer is configured (among others) by the file /etc/...
106 votes
4 answers
65k views

I'd like to use the Unix column command to format some text. I have fields delimited by tabs, but within each field there are also spaces. column delimits on white space (tabs and spaces). How can I ...
2 votes
1 answer
98 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 ...
67 votes
5 answers
50k views

Suppose that I want to delete all files in a folder that are greater than 1 MB. $ find . -size +1M | xargs -0 rm This will not delete files that have space in their names. So I want it to quote all ...
6 votes
2 answers
967 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 ...
2 votes
1 answer
88 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 ...
1 vote
1 answer
629 views

I created a path with spaces, and when I try to change directory I get "too many arguments" error message despite escaping the spaces or quoting the path : Here are the tests I made : # ...
0 votes
2 answers
2k views

typeset -f | sshpass -e ssh -o StrictHostKeyChecking=no user@${IPADDRESS} " $(cat); IFERROR=$(checkscript); echo "$IFERROR"" > ${SSHTEMPFILE} 2>&1 This line...I can't exclude the "...
5 votes
3 answers
4k views

My bash script: #!bin/bash MY_ARRAY=("Some string" "Another string") function join { local IFS="$1"; shift; echo -e "$*"; } join "," ${MY_ARRAY[@]} I want the output to be: Some string,Another string....

15 30 50 per page
1
2 3 4 5
73