On 16/6/24 20:02, DdB wrote:
Am 16.06.2024 um 10:13 schrieb Keith Bainbridge:> Practical Limitations
     Environment Variables: Bash has a limit on the number of environment
variables it can store, which is typically around 32,000. If you define
too many aliases, you may exceed this limit, causing issues with your
shell.
Hi,

  while being aware of those limitations, i got curious, as to why i
never ran into them in almpst 10 years of scripting. The answer is
probably, that i do use aliases only occasionally, most of the time i
use bash script files (in my path). And the largest file?

  Is actually one, i did not write myself, instead i found it on the
internet: checkbashisms. And even this big file only has 32K

So i am deferring, that you got into the habit to put most of your
scripting in one place, and that may be the wrong one. It's hard to
maintain and error-prone, as you are experiencing right now. Wouldn't it
be feasible to separate some of its volume out into normal bash files?

  Just my 2 cents
DdB


Thanks for your suggestion

Most of my aliases are simply simplifying shell commands like
alias llr='ls -lahR --group-directories-first'
or
alias du1='du -hPx --max-depth=1 '

The longer aliases were being converted to functions after I saw that recommendation here. This stopped when I made an error that stopped the functions from working as I expected.

I do little scripting as such; and most of that is processes I want done by cron, when a short one-line won't do.

17Jun2024@18:49:32

--
All the best

Keith Bainbridge

keithr...@gmail.com
keith.bainbridge.3...@gmail.com
+61 (0)447 667 468

UTC + 10:00

Reply via email to