Variable expansion in substitution

I have small script and I struggle with how variables expansion works.

for repo_data_path in ${PROJECTS_HOME}/**/.git(e:'[[ !$  REPLY =~ ".*local-hound/data/vcs.*"  ]]':) ; do   repo_path=(${repo_data_path:h}) cat << REPOSITEM "$  {repo_path:t}" : {             "url" : "file://${repo_path:s_/Users/mailo/Projects/my_/projects_}" }, REPOSITEM done  The script is provided with variable PROJECTS_HOME. Let’s say this variable contains /Users/mailo/Projects/my. I do use this variable at the beginning and it works. I just don’t know how to make it expanding in the substitution, where I currently use hardcoded path — $ {repo_path:s_/Users/mailo/Projects/my_/projects_}.

sed variable expansion not working (unterminated s’ command)

I have a file named config.yaml that contains this line:

device_connection_string: "<ADD DEVICE CONNECTION STRING HERE>" 

I want to replace <ADD DEVICE CONNECTION STRING HERE> with the value of the following variable:

root@ubuntu1804-ko-001:/tmp# echo "$CSTRING" HostName=PulseAzure-BetterTogetherDemo.azure-devices.net;DeviceId=ubuntu1804-ko-001;SharedAccessKey=xdWDu2gnzlg8X1mHgGqYU+yECBYUJ065n1AjdkYNCWI= root@ubuntu1804-ko-001:/tmp#  When I run this sed command, I get the unterminated s error: sed -i "s/<ADD DEVICE CONNECTION STRING HERE>/$  CSTRING/g" config.yaml sed: -e expression #1, char 38: unterminated s' command 

the sims 4 expansion packs

The whole process will just take a few moments.

Mirror Link —> THE SIMS 4 EXPANSION PACKS

– Title: the sims 4 expansion packs

the sims 4 expansion packs

bash shell script, searching for complex line in makefile (shell parameter expansion issue)

I have an annoying problem, I want a script to search through a makefile (using grep) for a particular annoying line. The problem is best illustrated concretely:

someMakefile (minimal Makefile):

#!/usr/bin/env bash echo bla bla OBJ_DIR='something' EXE_FILE='my_exe' cp $(OBJ_DIR)/$  (EXE_FILE) ../bin/. echo 'doing something else now' 

testScript.sh (test for the existence of the difficult line):

cat testScript.sh

#!/usr/bin/env bash set -x foundNumLines = $(grep -in 'cp$  (OBJ_DIR)/$(EXE_FILE) ../bin/.' someMakefile) echo "foundNumLines =$  foundNumLines" set +x 

From the commandline (this DOES work):

$grep -in 'cp$  (OBJ_DIR)/$(EXE_FILE) ../bin/.' someMakefile 5:cp$  (OBJ_DIR)/$(EXE_FILE) ../bin/.  From the script (this does NOT work and I cannot figure out how to make it work): $   ./testScript.sh  ++ grep -in 'cp $(OBJ_DIR)/$  (EXE_FILE) ../bin/.' someMakefile + foundNumLines = 5:cp '$(OBJ_DIR)/$  (EXE_FILE)' ../bin/. ./testScript.sh: line 4: foundNumLines: command not found + echo 'foundNumLines = ' foundNumLines =  + set +x 

When “grep” works from the script, I wanted to use maybe “wc” or similar, to detect the presence of the line and then do something, based on this…

I just cannot make it work, tried many combinations of “‘” \’ etc – I hope you understand, what I’m trying to achieve, please help with ideas/suggestions, thanks!

Taylor expansion of $\prod_{i=1}^n(1-x_i)^{-1/2}$ around 0

What is the Taylor expansion of $$\prod_{i=1}^n\frac{1}{\sqrt{1-x_i}}$$ around $$(0,0,…,0)$$？I know that we can write it as $$\prod_{i=1}^n\left(1+\sum_{k=1}^{\infty}\frac{(2k-1)!!x_i^k}{(2k)!!}\right)$$ But how to simplify it?

Is a Duergar’s Expansion and Invisibility abilities spell-like or psi-like? And does it matter?

The Duergar in the Monster Manual says that their expansion and invisibility abilities are spell-like abilities. But in the Expanded Psionics Handbook they are psi-like abilities.

Which is it? And does it matter? For example, if there was an area effect spell that prevented spell-like abilities, would it effect a duergar’s abilities (assuming they were psi-like)?

Array expansion with offset

I’m building a spreadsheet that shows bonuses granted to an employee that vest and pay out spread over the following three years.

In the first sheet, I have it working ok, but for every new year I have to manually place the {x/3, x/3, x/3} array formula into the correct year that vesting should start.

I want it work like the second sheet, where I just add new data to the green section, and the 3 payouts appear starting in the following year. In column C, I’ve calculated the offset where payout should begin. I just need a way for the array formula to start expansion at that offset.

Note that sometimes there’s more than one grant per year, if that matters.

Is this a correct Laurent series expansion for the given annulus?

Expand the function $$f(z) = \frac{1}{(z + 1)(z + 3)}$$ in a Laurent series valid for $$1 < |z| < 3$$

My attempt:

$$\frac{1}{(z + 1)(z + 3)}=\frac{1}{4}.\frac{1}{1+z}-\frac{1}{4}.\frac{1}{3+z}$$

$$=\frac{1}{4}.\frac{1}{1-(-z)}-\frac{1}{4}.\frac{1}{3-(-z)}$$

$$=\frac{1}{4}.\frac{1}{z}\frac{1}{\frac{1}{z}-(-1)}-\frac{1}{4}.\frac{1}{3-(-z)}$$

$$=\frac{1}{4}.\frac{1}{z}\frac{1}{1-(-\frac{1}{z})}-\frac{1}{4}.\frac{1}{3}.\frac{1}{1-(-\frac{z}{3})}$$

and now both fraction can be expanded using the geometric series

$$=\frac{1}{4}.\frac{1}{z}(1-\frac{1}{z}+\frac{1}{z^2}…)-\frac{1}{12}.(1-\frac{z}{3}+\frac{z^2}{3^2}…)$$

Is the expansion correct?

NOTE: What is written above is the entire question.

Taylor expansion of x^2*arctan((1-x)/(1+x))

I’m trying to compute the Taylor expansion of this function:

$$f(x) = x^2\arctan\bigg(\frac{1-x}{1+x}\bigg)$$

Is it necessary to use the Cauchy Product?

Expansion of a product of two q-pochhammer terms

For $$n$$ an integer and $$k$$ an integer > 0, with $$|q| < 1$$ a real number, consider the product $$A B$$ where $$A = (q^n; q^2)_k$$ and $$B = (-q^{n+1}; q^2)_k$$. That is,

$$AB = (q^n; q^2)_k (-q^{n+1}; q^2)_k = (q^n, -q^{n+1}; q^2)_k \tag{1}\label{eq1}.$$

Here $$(a; q)_n = \prod_{k=0}^{n – 1} (1 – a q^{k})$$ is the q-pochhammer symbol.

Is there a nice formula to expand $$\eqref{eq1}$$ beyond simply applying the q-binomial theorem, $$(a; q)_n = \sum_{k=0}^n (-1)^k q^\binom{k}{2} a^k {n \brack k}_q$$, to either one of the terms $$A$$ or $$B$$?

Note that I’m trying to prove an expansion formula for $$A B$$ with a particular value of $$|q| < 1$$ in mind. So far I’ve made no headway using the q-binomial theorem alone (even when attempting some further elementary transformations using identities from the appendix of Gasper & Rahman).

Any reference suggestions would also be helpful.