646 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
46
views
Handle string concatenation in worker code string
I understood that it's common sense to return the worker code as string but debugging and coding is a bit ackward this way. Such at this position, where I would like to concat several string to copy ...
2
votes
2
answers
336
views
Running a Powershell Start-Process command, with arguments containing spaces, from a batch script
I can't get this batch script to work, even though I tried a lot of things, I'm now stuck.
The intention is for the batch script to re-run itself elevated, using PowerShell and Start-Process, if the ...
-1
votes
3
answers
150
views
Unexpected output for five single quotes
There are five single quotes before and after text i like this:
h = '''''i'''''
print(h)
Output:
''i
How come?
2
votes
2
answers
254
views
Connect to Postgres Flexible Server via "az postgress" from PS1 Script when Password has characters needing escapes
I want to run a command on Azure Postgres Flexible Server via a PS1 (PSCore) script. The password can contain characters like < and ) that the PSCore parser chokes on.
I'm attempting to use the az ...
1
vote
1
answer
78
views
Docker Compose mangling YAML, how do I see the YAML it renders?
My Docker Compose is acting up, starting from https://stackoverflow.com/a/30064175, I have something like:
services:
stuff:
image: alpine
entrypoint: [ "/bin/sh", "-c" ]
...
1
vote
1
answer
72
views
Powershell Argument was missing the terminator: "
I am having problem with powershell arg design like this
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& { $scriptContent = Get-Content -Path 'C:\path\to\your\script.ps1' -Raw; $...
0
votes
0
answers
49
views
Why is dash quoting different in script and interactive?
I hope I have not fallen victim to the intricacies of shell expansion, but to me it seems dash treats quoting different depending on whether it's on an interactive command line, or in a script.
I have ...
0
votes
0
answers
42
views
how to expand a string in bash so that it evaluates to a pipeline [duplicate]
Suppose I have the following variable in a bash script cmd='echo hi | wc'.
Since I forgot how many characters are in the string "hi", I want to run cmd.
I expected this be as simple as ...
2
votes
1
answer
99
views
How can I fix conflicting symbols between git and powershell?
When I’m specifying gitrevisions in pwsh (eg HEAD@{3}), I have to conditionally remember to surround the gitrevision with quotes. If I don’t, it treats "@" as an array sub-expression operator.
Example:...
0
votes
2
answers
226
views
zsh brace expansion for argument containing spaces supplied from a variable
In zsh, how can I use brace expansion for an argument containing spaces supplied from a variable?
e.g., I want to rename a file from ~/a b/1.txt to ~/a b/2.txt.
I can do this manually from the command ...
2
votes
2
answers
255
views
How to pass PowerShell string parameter that has both `(backtick), ' and " inside?
I am executing a Python script using a PowerShell command, The Python script takes a string that could contain special characters inside it. This parameter is passed from an ansible pipeline. The ...
0
votes
1
answer
37
views
cant put substraction character as string
I am trying to write a bash script to create a filename using some variables, I should add "-" character in some places to obtain the correct filepath. However when I use the following ...
0
votes
1
answer
32
views
Invoking command with arguments from variable
I have a list of arguments, some which contain spaces, stored in a variable. When the command is invoked the arguments are not interpreted correctly. Here is a minimal example which illustrates the ...
2
votes
1
answer
136
views
Remove auto single quotes in GNU Parallel
I'm running this command, to change "Text to replace" in text files with the basename the text file:
parallel --dry-run sed -i \"s/Text to replace/{.}/\" {} ::: *.txt
However, ...
0
votes
1
answer
342
views
How do I make chroot run a command in the same directory in the new rootfs as I am in now?
I have various other Linux distros on other partitions and am trying to write a command called "on" that will run a shell command in that distro as the same user and in the same directory as ...