Skip to main content
7 events
when toggle format what by license comment
Apr 19, 2021 at 13:39 history edited JP Lew CC BY-SA 4.0
add better answer
Apr 19, 2021 at 12:27 comment added Jeff Schaller @JPLew if it's GNU sed, it has a -z or --null-data option
Apr 19, 2021 at 12:25 history edited JP Lew CC BY-SA 4.0
formatting
Apr 19, 2021 at 12:20 comment added JP Lew thanks for the tips! fswatch has a -0 flag which plays nice with xargs -0, but can you suggest how to get the sed command in between to recognize and pipe through the null character? This does not produce any output: fswatch -0xr site templates soupault.conf | sed -n "/Updated\x0/p"
Apr 19, 2021 at 11:56 review First posts
Apr 19, 2021 at 15:32
Apr 19, 2021 at 11:45 comment added Stéphane Chazelas Or grep --line-buffered 'Updated$' but you shouldn't use xargs -I without -d/-0 (unless fswatch happens to write data in that very specific format which seems unlikely) nor echo here (and -L1 is redundant). You'd also want to consider what would happen if a watched filename contains newline characters.
Apr 19, 2021 at 11:24 history answered JP Lew CC BY-SA 4.0