Skip to main content

SED Command sed command to replace a Stringstring from one file with entire contant from othecontents of another file

I want to create SED commandwrite a sed (or awk command) command to replace a Stringstring from one file with the entire contentcontents of otheranother file. Note that second file from which I want to get the contantcontent has more than one line. I have tried something like belowthis:

sed -e "s/PLACEHOLDER/$(sed 's:/:\\/:g' TestOutput.txt)/" SQLInput.txt

but got an error saying sed: -e expression #1, char 22: unterminated 's' command

SED Command to replace a String from one file with entire contant from othe file

I want to create SED command (or awk command) to replace a String from one file with entire content of other file. Note that second file from which I want to get the contant has more than one line. I have tried something like below

sed -e "s/PLACEHOLDER/$(sed 's:/:\\/:g' TestOutput.txt)/" SQLInput.txt

but got error saying sed: -e expression #1, char 22: unterminated 's' command

sed command to replace a string from one file with entire contents of another file

I want to write a sed (or awk) command to replace a string from one file with the entire contents of another file. Note that second file from which I want to get the content has more than one line. I tried this:

sed -e "s/PLACEHOLDER/$(sed 's:/:\\/:g' TestOutput.txt)/" SQLInput.txt

but got an error saying sed: -e expression #1, char 22: unterminated 's' command

presentation and tag
Source Link
Archemar
  • 32.3k
  • 18
  • 75
  • 106

I want to create SED command (or awk command) to replace a String from one file with entire content of other file. Note that second file from which I want to get the contant has more than one line. I have tried something like below

sed -e "s/PLACEHOLDER/$(sed 's:/:\\/:g' TestOutput.txt)/" SQLInput.txt

but got error saying "sed: -e expression #1, char 22: unterminated `s' command"

sed -e "s/PLACEHOLDER/$(sed 's:/:\/:g' TestOutput.txt)/" SQLInput.txt

Please help!sed: -e expression #1, char 22: unterminated 's' command

I want to create SED command (or awk command) to replace a String from one file with entire content of other file. Note that second file from which I want to get the contant has more than one line. I have tried something like below but got error saying "sed: -e expression #1, char 22: unterminated `s' command"

sed -e "s/PLACEHOLDER/$(sed 's:/:\/:g' TestOutput.txt)/" SQLInput.txt

Please help!

I want to create SED command (or awk command) to replace a String from one file with entire content of other file. Note that second file from which I want to get the contant has more than one line. I have tried something like below

sed -e "s/PLACEHOLDER/$(sed 's:/:\\/:g' TestOutput.txt)/" SQLInput.txt

but got error saying sed: -e expression #1, char 22: unterminated 's' command

Source Link

SED Command to replace a String from one file with entire contant from othe file

I want to create SED command (or awk command) to replace a String from one file with entire content of other file. Note that second file from which I want to get the contant has more than one line. I have tried something like below but got error saying "sed: -e expression #1, char 22: unterminated `s' command"

sed -e "s/PLACEHOLDER/$(sed 's:/:\/:g' TestOutput.txt)/" SQLInput.txt

Please help!