Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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}"
Source by askubuntu.com #
 
PREVIOUS NEXT
Tagged: #sed #variable #file
ADD COMMENT
Topic
Name
6+4 =