How to change a file's content by row?

Greetings.
So the question is basically the same as it's in the title.
I'd like to write a program that changes a file by rows. So to clarify it.
(i know i shouldn't use code,/code here but i would like to separate it)
So for example a text file looks like something like this:

Happy Birthday!
Happy Mother's day!
Happy New Year!
.
.
.
Happy Blablabla!

and the result should look like:

Happy Blablabla!
.
.
.
Happy New Year!
Happy Mother's day!
Happy Birthday!

Sorry for this stupid example, but I think it is easier to understand in this way. The reason why i post this is that i've got no idea how to start it. I've searched for some commands that might switch the lines but found nothing.
Thanks for your help in advance and sorry for my english, might have spelled something wrong!

Try tac command if you are on Linux.

or Try:

awk '!(A[i++]=$0); END { while(i--) print A }'  file

If you are not in interested in using a command but in writing the script yourself, you can read all the lines into an array and then print the array from the highest index down to the lowest.

I would like to write this as a script so i can use it whenever i will need it in the future. But i would like to change the file's structure. I mean i would like to overwrite the file.

You could write the result to a new file and then mv that new file to the old file.

Don't understand why put ! in awk,

awk '{A[i++]=$0} END { while(i--) print A }' urfile

learn from dennis.jacob by using NR.

awk  '{A[NR]=$0} END {NR++; while (NR--) print A[NR]}' urfile