From b0c958fb6274b5fd943e24bff2e70fd5721e0028 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Mon, 27 Jul 2015 22:52:17 -0700 Subject: [PATCH] Add coverage of watch. Thanks to ShawnMilo! Fixes #237 Fixes #241 --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9cc0e3d..7664dfa 100644 --- a/README.md +++ b/README.md @@ -293,6 +293,8 @@ A few examples of piecing together commands: cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn ``` +- To continuously monitor changes, use `watch`, e.g. check changes to files in a directory with `watch -d -n 2 'ls -rtlh | tail'` or to network settings while troubleshooting your wifi settings with `watch -d -n 2 ifconfig`. + - Run this function to get a random tip from this document (parses Markdown and extracts an item): ```sh function taocl() { @@ -329,7 +331,7 @@ A few examples of piecing together commands: - `fold`: wrap lines of text -- `column`: format text into columns or tables +- `column`: format text into fixed-width columns or tables - `expand` and `unexpand`: convert between tabs and spaces @@ -361,6 +363,8 @@ A few examples of piecing together commands: - `time`: execute and time a command +- `watch`: run a command repeatedly, showing results and/or highlighting changes + - `tac`: print files in reverse - `shuf`: random selection of lines from a file