From 8f4c182a0c86f320a4c2770a0e5154fbc82c57fa Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Sat, 3 Jun 2023 09:15:47 -0700 Subject: [PATCH] Explain how to do time based bash watch (#9345) --- crates/nu-command/src/filesystem/watch.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/nu-command/src/filesystem/watch.rs b/crates/nu-command/src/filesystem/watch.rs index 0b4c78d892..e0cf0014d8 100644 --- a/crates/nu-command/src/filesystem/watch.rs +++ b/crates/nu-command/src/filesystem/watch.rs @@ -282,6 +282,11 @@ impl Command for Watch { example: r#"watch /foo/bar { |op, path| $"($op) - ($path)(char nl)" | save --append changes_in_bar.log }"#, result: None, }, + Example { + description: "Note: if you are looking to run a command every N units of time, this can be accomplished with a loop and sleep", + example: r#"loop { command; sleep duration }"#, + result: None, + }, ] } }