4 ms·
I added "fortune | cowsay -f tux| lolcat" to my ~/.bashrc. It is always nice to see some often inspirational or thought-provoking quote if I open a terminal win
by JCWasmx86 5y ago
I added "fortune | cowsay -f tux| lolcat" to my ~/.bashrc. It is always nice to see some often inspirational or thought-provoking quote if I open a terminal window.
- mattowen_uk 5y agoI've ported fortune to Win32, and now have it show me a nice quote whenever I open a Command Prompt. It was feature I always wanted to have, and gave up waiting for MS to provide it. For me, my first ever experience of fortune was on DEC VMS systems.
- JCWasmx86 5y agoHas the cmd on windows an equivalent to .bashrc? If yes - TIL
- mattowen_uk 5y agoYes it does - it's specified via a registry key. I tried to find a reliable page to link to but the best I could find was this: https://ss64.com/nt/syntax-autoexec.html https://ss64.com/nt/syntax-autoexec.html Many, many, moons ago Windows NT had support for an 'autoexec.nt' batch file which did the same, so it's not a new feature just horribly undocumented.
- banana_giraffe 5y agoIt is actually documented in cmd /? .. kinda. cmd's help shows that autorun is disabled with /d, and mentions which keys it looks for. I use it to have a different prompt for administrator windows. To anyone using it: Be careful. Any side effects in your autorun script can have entertaining effects on batch files when you least expect it.
- jaclaz 5y agoTo be more precise, besides the warning on SS64 site, check also this: https://renenyffenegger.ch/notes/Windows/registry/tree/HKEY_CURRENT_USER/Software/Microsoft/Command-Processor/index https://renenyffenegger.ch/notes/Windows/registry/tree/HKEY_... TLDR is that for /f loops do spawn a child cmd.exe process and you won't like the result (recursiveness).
- banana_giraffe 5y agoThat's one I hadn't seen before, and would assuredly cause fun. The common one I've seen surprisingly often is the autorun script doing "cd" and causing for /f loops to break in some way.
- recursive 5y agoPowershell does. Microsoft.PowerShell_profile.ps1
- deleted 5y ago[deleted]
- ComodoHacker 5y agoDid you publish the port? Can't find any mentions on your website(s).
- mattowen_uk 5y agoNo. I didn't think there would be any interest tbh. I have 100s of little apps like that which I have never shared...
- gonzus 5y agoThanks for that! I added -a to fortune, so every once in a while (but not always) I get an offensive aphorism -- yes, I am willing to be offended! NOTE: this may require installing the offensive fortunes package.
- BeFlatXIII 5y agoI once wrote a script to pipe fortune -os into cowsay with random parameters. Unless things have changed in the past six years, cowsay inexplicably has no options to specify to use a random cowfile and randomly choose whether to say or think the aphorism.