Files
LogSeqDB/logseq/bak/pages/Scripts/Script_ Re Run/2025-08-02T12_41_20.925Z.android.md
2025-12-11 06:26:12 -08:00

531 B

title, updated, created, source
title updated created source
Script: Re Run 2022-08-15 12:55:30Z 2022-08-15 12:55:30Z https://news.ycombinator.com/item?id=32467957

I use this script, saved as `rerun`, to automatically re-execute a command whenever a file in the current directory changes:

 #!/usr/bin/sh

    while true; do
        reset;
        "$@";
        inotifywait -e MODIFY --recursive .
    done 

For example, if you invoke `rerun make test` then `rerun` will run `make test` whenever you save a file in your editor.