Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

sed substitute a word in a file by the content in another file

sed "s/100/$(cat -E file2 |tr -d '
')/;s/$/
/g" file1
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #sed #substitute #word #file #content #file
ADD COMMENT
Topic
Name
8+7 =