Executing a script when opening a terminal

Hey,

so I have some bash and rust scripts that I want to execute when I open a terminal. For example, one script displays the next three birthdays on my calendar. So every time I open a console I want to get the output of that script at the top.

I’m on KDE, using Konsole and usually opening it with ctrl+alt+t.

I looked around and didn’t find an answer to that specific problem. I had the idea of simply opening the terminal from inside the script itself and keeping it open, but I wanted to first ask, if someone has an idea how to solve the problem without doing that.

You can put it at the end of your .bashrc

3 Likes

Well, that was a fast and easy answer. Thanks!

3 Likes