asen_not_taken 5 months ago

I don't really use bash anymore for anything complex. The cognitive load of remembering all the commands and options is just too high. I simply describe what I need to do to claude code, and it gives me the exact one-liner I need. For me, that's the ultimate "utility" we've been looking for.

slightwinder 5 months ago

I don't understand the question. There is no perfection in software.

And what does "utilities in bash" mean? Do you mean features of specifically the bash-shell? Do you mean shell-tools in general? Or shells in general?

  • Forgret 5 months ago

    Utilities: ls, cp, grep etc. That is, are they all ideally suited for their purpose or do they have any drawbacks, and are there enough of them Bash Should there be more of them?

    • slightwinder 5 months ago

      > Utilities: ls, cp, grep etc.

      These are unrelated to bash. They are just commandline-tools; you can call them from any shell.

      > do they have any drawbacks,

      They all have their drawbacks, which is why there are constantly new tools, improving that space.

    • sksrbWgbfK 5 months ago

      > more of them

      More of what? What do you need and what are your problems?

      • 3np 5 months ago

        looking at the OP account history: HN comment engagement

stop50 5 months ago

I use shell for simple things like "do this for all the files in here". shellscripts for repeated stuff and wgeb it gets complicated i turn to programming languages like python

  • Forgret 5 months ago

    So, is the standard set of Bash syntax completely enough for you?

    • stop50 5 months ago

      After a certain amount of complexity you need lists of objects/structs/...(how you want to call it) and it is painful and/or dangerous.

    • sksrbWgbfK 5 months ago

      The bash syntax is irrelevant to the tools available. It's useless without tools to run.

bjourne 5 months ago

If you're talking about bash the shell scripting language then yes. In fact, I assert that removing dumb "features" is the only way to make it better.

cpach 5 months ago

Handling of maps/dictionaries could probably be improved. The current solution feels quite clunky.

no_time 5 months ago

Not really a utility per se, but I really really wish that echo {1..n} would run echo n number of times with the current index as the argument instead of expanding to a single string that gets printed.

I know you can do a for loop as a one liner but I somehow never get it right the first time and turns out to be a bit of a PIA.

  • Forgret 5 months ago

    You can use the following command:

    for i in {1..5}; do echo $i; done