time command, in the form of a script. Now I'd like to make every command that I run in the console run inside of that script. In other words, instead of timer sleep 5, it could just be sleep 5 and the shell would prefix that with the timer command. Is that possible? For what it's worth, I presume that a file of interest to configure this in would be the .bashrc file.
A function in the bashrc can probably achieve this, however it would be more standard to define all of your commands as args to your script, inside the very script itself.
it's not a dry run, or is it?
The commands portrayed in the screenshot have all been real executions, why?
Love your personal logs and the warm messages from server to user :)
arch huh?
just curious if it'd actually run the code or not
Regarding this, thanks for the compliment! Currently I manage this intro message in /etc/motd, because it is shown regardless of how you establish a shell on the system (SSH/local, root/user, TTY/GUI, etc). That being said though, I am contemplating to move this to /etc/profile instead. The problem is that the MOTD file is just static text. The /etc/profile file meanwhile acts more like the shells' rc files, while not being tied to one particular shell. More specifically, this file can contain executable code. This can make the intro message a lot more interactive, and even make it more modular.
why not use /etc/profile.d/ instead?
Maybe you could look at Ubuntu sources. I remember they had some code to show you ads in motd, right?
Could work yeah, I'll check up on that. Similarly, I've also seen a package named Cockpit append its information to the intro message, without adjusting the motd file. Perhaps that could be worth looking into as well.
Обсуждают сегодня