Answers for "sed substitute a word in a file by the content in another file"

0

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

sed "s/100/$(cat -E file2 |tr -d '\n')/;s/\\$/\n/g" file1
Posted by: Guest on August-12-2021
0

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

sed -e s/100/$(tr \\n $ < file2)/ -e s/\\$/\\n/g file1
Posted by: Guest on August-12-2021

Code answers related to "sed substitute a word in a file by the content in another file"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language