Skip to main content
2 of 3
formatting
JP Lew
  • 171
  • 7

I found the answer here: https://stackoverflow.com/a/23030127/1011766

Because fswatch is a long-running process, I had to use sed's -u flag to unbuffer the stream.

-u, --unbuffered

       load minimal amounts of data from the input files and flush the output buffers more often

This simple fix did it:

fswatch -xr mysitedir | sed -un '/Updated$/p' | xargs -L1 -I {} echo {}

JP Lew
  • 171
  • 7