I've got the following paragraph (saved on a file text.txt):
Good morning, my name is Maria.
I study in the university.
I like to travel.
And I would like to end up with three paragraphs exactly like that one but with different female names. Desired output:
Good morning, my name is Maria.
I study in the university.
I like to travel.
Good morning, my name is Lola.
I study in the university.
I like to travel.
Good morning, my name is Veronica.
I study in the university.
I like to travel.
So I made a txt file with the names, names.txt:
Maria
Lola
Veronica
And I wanted to come up with a for loop that iterates the paragraph but replaces the names with sed. So I did:
for i in names.txt; do sed 's/Maria/"$i"/g' text.txt; done
But what I get is this:
Good morning, my name is "$i".
I study in the university.
I like to travel.
Someone knows what could be wrong in my code? Thank you!