Skip to main content
4 votes
2 answers
136 views

Why do the third and fourth substitutions produce different results? #!/usr/bin/env raku use v6.d; my $str; my regex myregex1 { <[\d;]>+ }; $str = "abc3def0ghi"; $str.=subst( / <?...
sid_com's user avatar
  • 25.6k
5 votes
1 answer
110 views

I need to evaluate an expression within an R6 object. Let's say: A <- R6::R6Class('A', public=list( f1 = 1 )) test <- A$new() eval(...
luigidolcetti's user avatar
Advice
0 votes
9 replies
97 views

The task is to show line with variables from one variable (substitute like echo "${!VAR_NAME}" but for multible variables at once) i e g l=$(head -1 "$table") #this header can vary ...
Ivan's user avatar
  • 61
1 vote
2 answers
106 views

I have to split a string and use a part of it for further processing. So the idea is: string='aaa-bbb-ccc-ddd' parts=(${(@s:-:)string}) print -- $parts[3] # ccc I would like to refactor the second ...
MaxPowers's user avatar
  • 5,561
1 vote
1 answer
104 views

I tried to figure out how to replace a string variable to '*' a="bamtools/*/*bam_metric.summary.tsv" ## not working echo ${a/*\*/} I would like to see bam_metric.summary.tsv after ...
Jack Z's user avatar
  • 33
1 vote
1 answer
84 views

Consider the following output by the linsolve function of sympy. solution_vector = (-2.0*x2 - 2.0, 4.0*x4 + 4.0*x7 + 2.0, x2, -2.0*x4 - 1.0*x5 - 2.0*x7 - 2.0, x4, x5, x6, x7, x8) As we can see, in ...
some1fromhell's user avatar
5 votes
2 answers
145 views

I am working in R trying to create a wrapper function that calls a specified internal function (which is some existing function) and does some things with it. My wrapper function will include an ...
Ben's user avatar
  • 1,790
0 votes
2 answers
72 views

I have a dataframe of 10899 rows × 32 columns where there are many cells containing data that start with -9. e.g. -99.0, -9, -9.678, etc. How can I create a new dataframe from the original where all ...
Ramon Mendez's user avatar
0 votes
1 answer
77 views

I've used vi/vim since like 1995, and this operation always worked :1,$s/x/y/g But on this new box, running vim 7.4.629, when I run that command, it DOES do the operation, all x and now y, and ...
user1967804's user avatar
1 vote
0 answers
365 views

When I'm using & as a substitution variable SQL Developer in VSCode is saving my input instead of deleting it. For example, if I have '&ename' and enter Steven in the pop up, the next time I ...
NateGildersleeve's user avatar
0 votes
2 answers
92 views

For a Linux OS to be distributed I have an Openbox menu.xml file that contains about 30 words that would need to be translated for that menu to be localized. I assembled a .csv document with two ...
Jerry Bond's user avatar
-2 votes
2 answers
81 views

I am trying to do some file management in bash and I have strings in this format: 1 dir/hello.txt 2 dir2/bar.jpg When I run this substitution: ${FOO/[:space:]*/Hello} I get this result: 1 dir/hHello ...
Marcel Plch's user avatar
1 vote
0 answers
86 views

As part of a bigger powershell task, I need to remove a date (or datetime) prefix or suffix from a string (Actually a filename) The filename is returned from a file watcher, where the filter is *.txt. ...
Tony's user avatar
  • 21
0 votes
1 answer
82 views

According to the GCP CloudBuild documentation one can use shell parameter expansion in pipeline substitutions. I want to define a tag name for docker images based on the names of our git branches. ...
arkascha's user avatar
  • 43.2k
2 votes
1 answer
88 views

base::substitute's documentation describes it as follows: Substitution takes place by examining each component of the parse tree as follows: If it is not a bound symbol in ‘env’, it is unchanged. If ...
user615536's user avatar

15 30 50 per page
1
2 3 4 5
129