This tag is misspelled. variable-substitution is correct. `t` is missing. This is the process of evaluating a string literal containing one or more placeholders, yielding a result in which the placeholders are replaced with their corresponding values.
Questions tagged [variable-substitution]
74 questions
0
votes
0 answers
0
votes
1 answer
Makefile: Substituting suffix of variable before evaluation
QUESTION:
I would like to write a Makefile with a loop, which prints the contents of variables whose names contain the loop counter.
EXAMPLE:
For example, I would like something like the Makefile below
G_1 = a b c
G_2 = a2 b2 c2
G_3 = a3 b3…

Sophia Goulimis
- 1
- 1
0
votes
0 answers
Variable substitution: How to update values in a json file and then save the output of the now substituted file
I have a script that I want to do variable substitution on a json file.
It takes json file A and json file B and converts it into a dynamic object.
So you end up with something like this:
For Json File A:
Json file A key
Json file A…

polo
- 155
- 4
- 11
0
votes
2 answers
Can a Gnu Make variable substitution expression match more than one pattern?
Say I have a list of files with mixed suffixes, e.g. .cpp and .c, and I want to make a list where each .cpp and each .c extension is changed to .o. I realize I could sequentially process my list multiple times, one for each extension of interest.…

Michael57
- 85
- 7
0
votes
0 answers
Editing TXT file content using a wildcard
I'm working on a content editor, which will edit the data inside a txt file, changing it to whatever you programmed it to.
This is my original script:
@echo off
setlocal enableextensions disabledelayedexpansion
set "search=Stars"
set…

JR Santos
- 137
- 1
- 11
0
votes
1 answer
How to add variables in a call to Start-Process
I'm building a PowerShell script to run the following command on various servers:
arapx acc, Export ExportFile=\"C:\\Temp\\DEV_Refresh\\AccExport.txt\"
This code works:
Start-Process -FilePath '\\\Bin\arapx' -argumentList 'acc, Export…

Ken
- 77
- 9
0
votes
1 answer
Passing variables from bash script into Oracle SQL*Plus
I've tried a few different methods (from here and elsewhere) with no success and was hoping if one of the more experienced individuals of yourselves would be able to help.
This is my shell script
read -p 'What is the ID? ' asnid
if [ -z "$asnid"…

LJMurru
- 3
- 3
0
votes
2 answers
Embedded parameter substitution
This is what parameter substitution would be one by one (transforming a picture file name into a date) :
var=“2020-12-30 11-30-55CX.mov”
p1=${var:0:11}
pt=${var:11:8}
p2=${pt//-/:}
dt=“${p1} ${p2}”
I want to do this in one shot, something like this…

Guasqueño
- 405
- 9
- 20
0
votes
1 answer
Getting a count of rows inserted in a Snowflake procedure
I'm using a procedure to insert rows into a table. I want to return the count of rows inserted, but I can't figure out how to turn on the variable substitution from inside a procedure. I've tried all of the following, but they all return…

ASturt
- 193
- 1
- 4
- 12
0
votes
1 answer
Substituting variable in a dataframe row based on other row's value
I have a dataframe that contains ID, Formula, and a dependent ID column that I extracted the ID from the Formula column.
Now I have to substitute all the dependent ID into the formulas based on the dataframe.
My approach is to run a nested loop for…

user10969675
- 59
- 5
0
votes
2 answers
Dotnet framework - Nlog configuration change using variable substitution in TFS cd pipeline
I have Nlog configuration in the web config file and I would like to change the file path in the CD pipeline in order to put some dynamic path based on the environment.
Right now the web.config file variable substitution (XML Variable Substitution…

Abi P
- 1,410
- 3
- 22
- 36
0
votes
1 answer
Azure DevOps Pipeline Json Variable Substitution - Microsoft.Hosting.Lifetime
How can I change the value of Logging:LogLevel:Microsoft.Hosting.Lifetime using a Json Variable Substitution task in Azure DevOps?
This…

Beakie
- 1,948
- 3
- 20
- 46
0
votes
1 answer
Capture and replace a string found between two strings
I am trying to replace the values for a specific variable named variable but only if this is contained between two strings, namely between group1 and group2. (or group1 till the end of text if group2 isn't found)
variable can also be found between…

Florian Bidabé
- 640
- 8
- 22
0
votes
1 answer
Xml Transformation and Variable substitution doesn't work when both selected in Azure DevOps
I have been working on the build and release pipelines for a while now, but ran into this issue lately
I am performing config transform on .net application. The issue i am running into is a bit strange .. Variable substitution doesn’t work if xml…

AnsibleUser
- 65
- 1
- 8
0
votes
0 answers
KeyVault --> Azure Pipeline --> XML variable substitution adds extra single quote to the end which breaks the connection string
I asked previously how to do variable substitution with Azure KeyVault here, and was able to get it mostly working save one last issue. For some unknown reason, the substitution occurs perfectly but it adds one extra single quote at the end. Since…

Hershizer33
- 1,206
- 2
- 23
- 46