Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
85 views

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 ...
AntonSack's user avatar
  • 1,047
2 votes
2 answers
479 views

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 ...
Eledwin's user avatar
  • 171
-1 votes
3 answers
152 views

There are five single quotes before and after text i like this: h = '''''i''''' print(h) Output: ''i How come?
dadi007's user avatar
  • 45
2 votes
2 answers
312 views

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 ...
Howard Hoffman's user avatar
1 vote
1 answer
88 views

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" ] ...
A T's user avatar
  • 14k
1 vote
1 answer
90 views

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; $...
ThÀnH DaNh NgUyỄn's user avatar
0 votes
0 answers
65 views

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 ...
Peter Rottengatter's user avatar
0 votes
0 answers
42 views

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 ...
Mark VY's user avatar
  • 1,741
2 votes
1 answer
106 views

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:...
Qubitz's user avatar
  • 45
0 votes
2 answers
245 views

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 ...
XDR's user avatar
  • 4,598
2 votes
2 answers
285 views

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 ...
Praveen Dinelka's user avatar
0 votes
1 answer
39 views

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 ...
Yagmur CA's user avatar
0 votes
1 answer
34 views

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 ...
August Karlstrom's user avatar
2 votes
1 answer
155 views

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, ...
Geremia's user avatar
  • 5,906
0 votes
1 answer
357 views

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 ...
martinwguy's user avatar
2 votes
2 answers
244 views

I have the following bash script that I do not have control over: set -x echo "$CMD" if ${CMD}; then echo "Success" fi I'm trying to run the following command: bash -c "...
Yeti's user avatar
  • 891
1 vote
0 answers
756 views

I have a Dockerfile where I'm building the image from go source and I need to pass the -ldflags as an argument to the go build command. Below is a snippet of the Dockerfile: // from statement and ...
Cheshar's user avatar
  • 607
1 vote
1 answer
159 views

Got a problem understanding how to escape out chars in PS, so they are not interpreted as operators or instructions. I'm writing a PS script to find chars in filenames which are to be forbidden, and ...
Kaley's user avatar
  • 33
1 vote
1 answer
63 views

I am developing a python script which, given: the path of a csv file a list of names of some of the columns of the csv file a string to-be-replaced (A) a string to-replace-with (B) should: ...
Tms91's user avatar
  • 4,430
19 votes
2 answers
39k views

After updating to Python 3.12, I get warnings about invalid escape sequence on some triple-quotes comments. Is this a new restriction? I have the habit of documenting code using triple-quoted string, ...
MortenB's user avatar
  • 3,831
1 vote
1 answer
48 views

#Reading from csv file with open('py_csv/oscar_age_male.csv','r') as csv_file: csv_reader=csv.reader(csv_file) #Creating new file and opening it and changing delimiter with open('py_csv/...
Md Aatif Hasan's user avatar
0 votes
1 answer
117 views

How do I use HTML that has double quotes ("") in a Swift Playgrounds (iPad) WKWebView? I tried to do it this way using \ before the quotes: Note, this was done in a playground, not an app. ...
anon62782349's user avatar
0 votes
1 answer
84 views

On Linux with bash 5.2.15, single quotes prevent globbing as expected: Good $ dir='/path?/to?/file?'; echo $dir /path?/to?/file? $ However, on macOS with bash 3.2.57, I get this undesirable behavior: ...
Bill Wohler's user avatar
3 votes
1 answer
2k views

I want to save a Pandas dataframe to a CSV file in such a way that no additional double quotes or any other characters are added to these formulas. Here is my attempt: import pandas as pd data = { ...
Javide's user avatar
  • 2,657
0 votes
2 answers
48 views

I need to execute a bash command where, only if a variable is set, I want to include that variable on the command line. The trick is that the variable could have a space in it, and the variable must ...
Seth Robertson's user avatar
0 votes
1 answer
140 views

I have a large number of Excel files to be processed. I've created code that reads their names into a dataset for execution of each file. Each of the files, unfortunately, has an open left parentheses ...
Jason Schoeneberger's user avatar
1 vote
2 answers
224 views

I have following loop: for /f "tokens=1-3 delims=- " %%a in (' powershell.exe -Command "Get-EventLog -ErrorAction SilentlyContinue -Newest 1 -LogName System -EntryType Error -Source ...
user2956477's user avatar
  • 1,358
1 vote
2 answers
787 views

I am trying to make the following command work in Powershell: mvn -Dhttp.nonProxyHosts='xxx.xxx.*|*.example.com|*.example2.com|localhost|127.0.0.1' -DskipTests clean install This command works fine ...
CloudWatcher's user avatar
0 votes
0 answers
21 views

I am trying to calculate a survival function over multiple variables, one of which is fu_time_PJP and fu_status_PJP. Here is the function, which works great under those paramaters: km_time <- ...
Michael Putman's user avatar
0 votes
1 answer
355 views

any idea to fix the following that I have with my script? Set objShell = CreateObject("Wscript.Shell") objShell.Run("powershell -Command "Start-Process 'cmd' -Verb RunAs -...
Mario's user avatar
  • 9
0 votes
1 answer
262 views

I am learning using rust to write a rest api to update some record. I have defined a rust(v1.69.0) rocket api like this: #[macro_use] extern crate rocket; use rocket::{serde::json::Json, response::...
spark's user avatar
  • 1,183
0 votes
0 answers
132 views

In R, I am running a for loop and in each loop I create a variable (var) by referring to the value in a column in a dataframe (dataframe is called temp). I then want to pass this variable (var) as one ...
Jon's user avatar
  • 75
1 vote
1 answer
1k views

If I have %20 in URL before, it ends up with + in the code. url='http://www.example.com?param=a%20b' url=URL(url) url=url.copy_merge_params(params={}) In QueryParams.str it's invoking urlencode() ...
aikipooh's user avatar
  • 301
1 vote
2 answers
419 views

My Goal I'm writing a small Bash script, which uses entr, which is a utility to re-run arbitrary commands when it detects file-system events. My immediate goal is to pass entr a command which converts ...
Jonathan Hartley's user avatar
0 votes
2 answers
47 views

public function semua_data1() { $this->db->select('*'); $this->db->from('tbl_m_stock'); $tgl = date('Y-m-d', strtotime("-365 day", strtotime(date('Y-m-d')))); $...
Kahfi's user avatar
  • 9
1 vote
1 answer
461 views

I was writing a PowerShell script, and forgot to quote $input when piping to a command. The command unexpectedly appeared to receive the string Current on stdin, so I investigated further and typed ...
craig65535's user avatar
  • 3,600
-3 votes
2 answers
178 views

In the process of converting a blog from WordPress to Hugo, I find that I need to do a global search and replace for tags to convert them to a list of strings. Currently I have something like this: ...
Andrew Matthews's user avatar
0 votes
2 answers
3k views

I've been pulling my hair out all day because of this issue. I'm working on a powershell one-liner and Powershell is being picky with what quotation mark I use. “ vs ", with powershell requiring ...
Thrasherop's user avatar
0 votes
1 answer
102 views

I’ve got build scripts working perfectly for Linux bash. Currently I’d like to adapt build for Cygwin, to make it cross-platform. The problem is the build script uses pipe redirection like | and >, ...
Rom098's user avatar
  • 2,661
1 vote
2 answers
88 views

Goal: I have a sneaking suspicion that I'm globbing incorrectly due to not being able to find a satisfactory explanation with multiple clear examples of advanced string-and-var mixing. The operation I ...
Wolfpack'08's user avatar
  • 4,168
-1 votes
2 answers
1k views

I have a JSON I found that seems to fail to be able to remove an Array after indexing once. Here is the valid JSON below (according to jsonlint.com Goal: Remove an outer array from what {was a valid ...
Goldfish's user avatar
  • 780
1 vote
1 answer
104 views

I have the following line of code that I use to download and combine dns text records from my website and execute them in powershell. I can run this command just fine from the console but can not ...
I am Jakoby's user avatar
15 votes
1 answer
3k views

I use WinSCP within a Powershell script. It suddenly stopped working. After a while I could figure out that the problem appeared from a more recent version of PowerShell: Reduced code: & winscp ` ...
JFFIGK's user avatar
  • 714
0 votes
4 answers
87 views

I am using bash and trying to do pass quoted arguments to a function using a string variable and it fails. myfunc() { for myarg in "${@}" do echo ">$myarg<&...
swdev's user avatar
  • 3,121
0 votes
1 answer
172 views

I have a function rts() which generates a couple of different charts and displays the raw data they are based on. The argument is another function, raw_data(), which filters a larger data set based ...
Phenomniverse's user avatar
-1 votes
1 answer
1k views

I have a script that accepts two strings, each are delimited by '|-|'. The second string can contain any character other than '. To call the script I do: PowerShell .\script.ps1 -arg1 'Hello|-|World' -...
CodePidgy's user avatar
1 vote
1 answer
67 views

I'm trying to understand quoting in clojure and came across this article. While trying out the examples, I'm confused about the order of evaluation of quoting expressions. `(~`'baz) ;; ↪ ('user/baz) `...
TheChetan's user avatar
  • 4,614
1 vote
1 answer
250 views

I'm using Windows 10 x64, Powershell Core 7.2.6, and /usr/bin/sed (GNU sed) 4.8 installed with Git for Windows. No WSL at all. I have a .env file like this. ENDPOINT="localhost:3000" and I ...
Fred Hors's user avatar
  • 3,863
1 vote
1 answer
1k views

I am struggling on this for hours now ... Its a syntax question basically how do I make this work : $test = '{"Title": $name}' The $name is not recognize as a variable. this is a simple ...
Ricola's user avatar
  • 51
1 vote
2 answers
126 views

Is it possible to pass value with single dollar from shell to Makefile, or I it is only way to put double dollar in bash and then to call make? Makefile is: HASH ?= $$6$$salt$$val .PHONY: tst tst: ...
Gennady Kovalev's user avatar

1
2 3 4 5
14