Insert two strings at the beginning and at the end of each line of a file

Hi, excuse me for my poor english.
My problem is that:

I have a File
i want to add to each line of that file two strings: one at the beginning of the line, one at the ending.

string1="abcd"
string2="efgh"

i want $string1 content $string2 for each line.
Is that possible?

awk '{ print "abcd", $0, "efgh" } ' inputfilename> tmp.tmp
# with variables
awk -v string1="$string1" -v string2="$string2" '{ print string1, $0, string2 } ' inputfilename> tmp.tmp

mv tmp.tmp inputfilename

thank you very much for the quick reply. It works flawlessly :b:

I'd like to know also how to remove the spaces between content and strings inserted if it's possible

Ignore me, i've found how to remove spaces by myself.

Thanks again :smiley: