Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

passing bash variable to sed

rr=abcd # in shell

sed -i "s/aaa/$rr/g" file.dat 

# -i will update thefile, 
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #passing #bash #variable #sed
ADD COMMENT
Topic
Name
1+4 =