How do I write a bash script that prints every line of one file also in second file

It can be done with grep only

grep -f file1 file2
grep -f file2 file1