Use the $a syntax and sed:
-i parameter means in place.
A previous post explained how to insert a line anywhere but for completeness here it is again:
1
|
sed -i -e "2i some text on second line" filename
|
1
|
sed -i -e "$a some text" filename
|
1
|
sed -i -e "2i some text on second line" filename
|
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment