Cat file1 into file2 after specific pattern match

cattext processing

I have file1 & file2, I want to cat file1 into file2 after match of 22 pattern.
Can I do it with cat or I need to go for awk or sed

file1

aa
bb
cc

file2

11
22
33
44

Resultant file2

11
22
aa
bb
cc
33
44

Best Answer

With sed:

sed -e '/22/r file1' file2
Related Question