News for hackers. Stuff that matters.
Re:Write Posix Shell by pjmlp on Saturday March 11, 2023 @10:50AM (#35109286)
Do you a good anecdote regarding shell scripts?

Long time ago some dude created a couple of korn shell scripts on Aix to automate file uploads and ETL related tasks.

With time that work moved from Aix into Red-Hat Linux, still korn shell, with the adaptations from Aix into GNU/Linux command line parameters and such.

I got tasked to port them into Java, because the team that got the job to maintain the servers lacked UNIX experience, and they thought selling the porting project was a good idea.

Feedback from customer, slower than those scripts and not as easy to change, what a surprise.

Re:Write Posix Shell by kps on Saturday March 11, 2023 @11:28AM (#35109774)
I use Korn shell (ksh93) for quick scripts. Besides arrays and such (it's approximately a superset of bash, since bash copied some but not all of ksh), the killer feature is a declarative extended `getopts` that makes it trivial to provide even the quickest and dirtiest script with short/long option processing with full help, so that the purpose and usage of the script remain comprehensible five days or five years later. https://gist.github.com/kpschoedel/91fdcfa934111f3846efb5034...