News for hackers. Stuff that matters.
Re:What's New in POSIX 2024 by akira2501 on Tuesday October 29, 2024 @04:31AM (#41980909)
> I haven't seen any other tool ever have so many pitfalls.

I haven't seen any other tool with so much general utility and availability.

> to loop over a string array and print its contents

Is incredibly easy in bash and bash like shells. As highlighted the issue is that tools like 'ls' don't create "a string array." They create one giant string that has to be parsed. The rules in the shell are different than in other languages but it /will/ do most of the parsing for you, or all of it, if you do it carefully.

This is a fine tradeoff. As evidenced by it's wide usage and lack of convincing replacements.

Re:What's New in POSIX 2024 by anal_reactor on Tuesday October 29, 2024 @04:43AM (#41980985)
> I haven't seen any other tool with so much general utility and availability.

> availability

That's the real reason why we use Unix shell. It's not good, but it's available. Like a cheap hooker.

> but it /will/ do most of the parsing for you, or all of it, if you do it carefully.

"It mostly works if you're careful" doesn't sound very convincing to me.

Re:What's New in POSIX 2024 by stephenr on Tuesday October 29, 2024 @07:21AM (#41982714)
> but it's available. Like a cheap hooker.

Username checks out.

Re:What's New in POSIX 2024 by akira2501 on Tuesday October 29, 2024 @01:57PM (#41987470)
> "It mostly works if you're careful" doesn't sound very convincing to me.

Would you rather write your own parser?