Похожие чаты

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 ответов

17 просмотров

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.

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

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

Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
248
isnt that how its called? lol
Hobbyist
34
------------------------------------------------------------------------------ 📢 MAJOR ANNOUNCEMENT: HSUITE ECOSYSTEM UPDATE 📢 @everyone Dear HbarSuite Community, After month...
Big Stones
3
Здравствуйте, вопрос по структурам данных. Были у вас случаи, когда пришлось писать деревья или двунаправленные списки?
/ /
48
Let's say the current price of BCH is 400$, and average fee for transaction is .1$ If the price jumps to let's say 4000$, transaction fee should be 1$ ? I don't know exactly ...
Mohamed
28
Всем привет! Скажите, никто не пытался уменьшить размер процесса ssl, которые ассоциируется с открытым соединением (не помню точное название этого процесса, но там была какая-...
Алексей
20
а проверьте, собирается ли у кого сейчас транк лазаря через делюкс? у меня вот: fpcupdeluxe: info: Lazarus Native Installer (BuildModuleCustom: UserIDE): LazBuild: building Us...
Iluha Companets
20
This is a big issue. Just by being a citizen of a country, you are denied to contribute to Open Source software: https://youtu.be/L5Ec5jrpLVk?si=1iIuHnMPbCB4anV-
Sharuzzaman Ahmat Raslan
72
Boba Community: Be fair and please review each submission. Vote for the best one. Which post has correct and up-to-date info? Effort? Best COMMUNITY feedback/response...
Omen in the Rain
6
Мне тут приспичило встроить в программу форматировние текста SQL, расставить переносы строк и отступы так, чтобы лучше читалось. Я что-то свое изобразил, оно после ключевых сл...
Sergey Bodrov
11
Карта сайта