From 1802188e56e19ca1afb9ea748f45b00a07ffb938 Mon Sep 17 00:00:00 2001 From: Olof-Joachim Frahm Date: Wed, 11 Nov 2015 15:21:22 +0100 Subject: [PATCH] Add example to Unix post. --- limits-of-unix.post | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/limits-of-unix.post b/limits-of-unix.post index 56f8a07..f214b74 100644 --- a/limits-of-unix.post +++ b/limits-of-unix.post @@ -40,7 +40,14 @@ immediately, instead of rerunning the whole pipeline. E.g. coming from Common Lisp, variables like `*` to `***` will store the last three results for interactive use. In the shell then, `ls` would set `*` to the generated directory listing; since the listing is also most likely printed to the screen, -the full listing will also be stored (in that object) to be used again if e.g. `*` -is requested again. Rerunning the command, on the other hand, will possibly -generate a different directory listing as files may have been changed, so there -*is* an immediate difference between the two forms. +the full listing will also be stored (in that object) to be used again if e.g. +`*` is requested again. Rerunning the command, on the other hand, will +possibly generate a different directory listing as files may have been changed, +so there *is* an immediate difference between the two forms. + +# Examples + +The pipeline `ls | wc -l` is (at least for me) often used to get the number of +files in the (current) directory. Unfortunately there is no direct way to get +this number directly except to enumerate the entries in a directory (under +Linux that is). -- 1.7.10.4