danielrotter.at

Chais , to Linux in Automatic command execution on file changes with entr
@Chais@sh.itjust.works avatar

What’s wrong with a simple path unit?

danrot OP ,

I am not exactly sure what you mean by that... But the main advantage is that the command does not have to be executed manually everytime you change something. Instead entr recognizes when something changes and re-executes the command for you.

Chais ,
@Chais@sh.itjust.works avatar

That’s what a systemd.path unit accomplishes, too. It watches a path, and if that file/directory changes, it starts its accompanying systemd.service.

danrot OP ,

Ah, you are talking about systemd, wasn't aware of that... I imagine that to be much more complicated for many use cases. E.g. running a unit test (as I describe in the article) isn't something I would use systemd for. Setting up a path and a service seems more complicated than using entr, and it is probably also harder to get to the output as well.

Cwilliams , to Linux in Execute commands for multiple files using fish

This isn’t just a fish thing, it works with bash, zsh, etc too

danrot OP ,

That's true, but the syntax is different then. In this blog post I cover fish, and I didn't intent to say that this cannot be done in other shells (and I think I never said so).

Cwilliams ,

Oh, thanks for the clarification!

ShaunaTheDead ,
@ShaunaTheDead@kbin.social avatar

Pretty unrelated, but I just wanted to say that I love how bash scripting uses if to open an if statement and fi to close it... makes me giggle every time lol

Cwilliams ,

Comment Same! It’s really funny Tnemmoc

danrot OP ,

Doesn't it also use case and esacand a few others? Such a weird language^^

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • All magazines