I'm having following data in file
Line 1
Now I have to add the three new lines at
line number 3,5,6
but when I use
sed -i '3i string1' file
sed -i '4i string2' file
sed -i '6i string3' file
it is not appending the data unless it having some lines in it.
but when that file is empty then it is not add the data as there is no line number which sed can find.
So how I can able to add this line in file.