Answers for "sed variable instead of file"

0

sed variable instead of file

# The above is a bash replacement construct. Given a variable $var,
# a pattern pat and a replacement (rep), to replace all occurrences 
# of pat with rep, you would do
echo "${var//pat/rep}"
Posted by: Guest on March-25-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language