Похожие чаты

A while ago I made a customized version of bash's

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.

10 ответов

21 просмотр

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?

Vim- Автор вопроса
B҉a̸͔tͥ̄ͅc͞h̢͊4̾̄̕2͗0̤̩ (G0J1R4)
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?

Vim- Автор вопроса
Alexander Gnatyuk
Love your personal logs and the warm messages from...

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.

Vim
Regarding this, thanks for the compliment! Current...

Maybe you could look at Ubuntu sources. I remember they had some code to show you ads in motd, right?

Vim- Автор вопроса
Alexander Gnatyuk
Maybe you could look at Ubuntu sources. I remember...

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.

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта