I want to insert the content between the matching pattern in shell please help on this
For example :
file called input.txt :
var a = [ ]
sed "s/\[/[ $(xargs < output.txt)/" input.txt
xargs < filename dumps all file lines in just one, i.e., replaces EOL characters for SPACE characters.
$(xargs < filename) expands to the contents of the
filename in just one line. Hence the use of double quotes, not single ones.