Top "Substitution" questions

The action of replacing something with another thing.

shell string bad substitution

I'm new to shell programming. I intend to get directory name after zip file was extracted. The print statement of …

string shell substitution
Command substitution: backticks or dollar sign / paren enclosed?

What's the preferred way to do command substitution in bash? I've always done it like this: echo "Hello, `whoami`." But …

bash shell command substitution
Excel escaping quotes or apostrophes in cell values

I get a lot of database information from clients in excel spreadsheets. I frequently need to insert/update this data …

sql excel replace apostrophe substitution
How to get values from dictionary in jinja when key is a variable?

I'm trying to retrieve entries from a python dictionary in jinja2, but the problem is I don't know what key …

python variables dictionary jinja2 substitution
Bash bad substitution with subshell and substring

A contrived example... given FOO="/foo/bar/baz" this works (in bash) BAR=$(basename $FOO) # result is BAR="baz" BAZ=${…

bash string substitution subshell
how to substitute part of a string in python?

How to replace a set of characters inside another string in Python? Here is what I'm trying to do: let's …

python string substitution substring
How to avoid heredoc expanding variables?

I'm trying to create a script file using substitution string from ENV but want also to prevent some from escaping …

bash escaping substitution heredoc
How can I make SQL Developer/SQL+ prompt only once for a substitution variable that occurs multiple times in a single statement?

I have a query roughly like this: select * from A_TABLE where A_COLUMN = '&aVariable' union select * from …

sql plsql variables substitution
replace newline character in bash variable?

I am trying to understand the "cdargs-bash.sh" script with cdargs packages. And I have a question about in the …

bash newline substitution
Prepend file names with plus sign

I want to add a + (plus sign) before all the occurrences of image names in a huge file, using sed. …

regex sed substitution