Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
Advice
0 votes
9 replies
92 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
92 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 ...
1 vote
1 answer
97 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 ...
1 vote
1 answer
78 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 ...
5 votes
2 answers
136 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
67 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 ...
0 votes
1 answer
71 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 ...
1 vote
0 answers
329 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 ...
0 votes
2 answers
88 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 ...
-2 votes
2 answers
79 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 ...
1 vote
0 answers
77 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
  • 11
0 votes
1 answer
77 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. ...
2 votes
1 answer
83 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 ...
2 votes
2 answers
135 views

Below is the Perl script: my $var=" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...
-2 votes
1 answer
103 views

When I try to separate a string into its characters, it fails on spaces and newlines: str=" random string " echo ${str//?/ \'&} ' 'r 'a 'n 'd 'o 'm ' 's 't 'r 'i 'n 'g ' The parameter ...

15 30 50 per page
1
2 3 4 5
...
129

AltStyle によって変換されたページ (->オリジナル) /