Hello all,
I need some help please.
I got file1 with names.
foo bar
foo bar
foo bar
foo bar
foo bar
and I got file2 with some text
some text
some text
#KEYWORD
some text
some text
some text
after the #KEYWORD I need to add the following line
email "foo bar"
in double quotes and basically loop through file1.
#!/bin/sh
while read line
do
sed '/#KEYWORD/a email = "'${line}'"' file2 > file3
# do stuff with file3 and keep looping
sleep 10
done < file1
cat file3
some text
some text
#KEYWORD
email = "foo
some text
some text
some text
Why not some email = "foo bar" ?????
Thanks guys