News for hackers. Stuff that matters.
Re:Hush, a modern shell scripting language by cjohnson318 on Tuesday April 26, 2022 @11:03AM (#31168337)
I don't have exact rules, but if it's (1) quick, (2) simple to read/write in shell, (3) separate from my app's business logic, then I'll use a shell script.

For example, to take a line off of the end of a file, sed is pretty easy:

    sed -i '' -e '$ d' file.txt
After a few pipes, I will reach for Python. Regarding line count, after a `if __name__ == '__main__':` block and some helpful docstrings, it ends up being about thirty lines or so. "\N{man shrugging}"

There are no comments on this comment yet.