michal-sapka-me

Codebase for my homepage.
git clone git://vcs.sapka.me/michal-sapka-me
Log | Files | Refs

commit 9b332be370efa1d29c3662461eece10b1e3d305c
parent 93f263358e02fbb4739a00452deb7db56ab02fbb
Author: d-s <ds@voyager.local>
Date:   Wed,  5 Apr 2023 21:59:10 +0200

feat: article for 2023-04-05

Diffstat:
Acontent/2023/write-posix-shell.md | 25+++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)

diff --git a/content/2023/write-posix-shell.md b/content/2023/write-posix-shell.md @@ -0,0 +1,25 @@ +--- +title: "Write Posix Shell" +category: "software" +abstract: A shell script may be just what you need +date: 2023-04-05T21:54:48+02:00 +year: 2023 +draft: false +tags: +- POSIX +- shell +- scripting +- bash +- luke-smith +- jes-olson +--- +[Jes Olson](https://j3s.sh/thought/write-posix-shell.html): +> when the problem you're solving is small, well defined, +> and unlikely to change, consider shell. +> +> when the problem you're solving involves linux, +> text processing, or managing files, consider shell. + +This is what [Luke Smith](https://odysee.com/@Luke:7) taught me: a shell script is often enough. Of course, you can use Ruby, Python - heck, even JavaScript. But often, you don't need it, as a simple shell is more than enough. + +What FreeBSD experience added to that is portability. I try not to use bashisms anymore (thanks to [shellcheck](https://www.shellcheck.net)), as POSIX is good enough. If it's not, maybe shell is not the best approach for this problem. Portability and lack of dependencies will pay out eventually.