summary refs log tree commit diff
path: root/README.md
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-08-27 14:56:17 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-08-27 14:56:17 +0200
commitd05a334ffb2ca9634181b6b6929c3b29c427a1eb (patch)
treed8bcb73c986cb101b81c34764f22ebcaf053a746 /README.md
parentf6db8d670e6055d1db83aed1dcda593beee37c67 (diff)
downloadnq-d05a334ffb2ca9634181b6b6929c3b29c427a1eb.tar.gz
nq-d05a334ffb2ca9634181b6b6929c3b29c427a1eb.tar.xz
nq-d05a334ffb2ca9634181b6b6929c3b29c427a1eb.zip
README.md: add some examples
Diffstat (limited to 'README.md')
-rw-r--r--README.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4d48064..3028870 100644
--- a/README.md
+++ b/README.md
@@ -52,6 +52,40 @@ different queues for different purposes is encouraged.
 All these operations take worst-case quadratic time in the amount of
 lock files produced, so you should clean them regularly.
 
+## Examples
+
+Build targets `clean`, `depends`, `all`, without occupying the terminal:
+
+	% nq make clean
+	% nq make depends
+	% nq make all
+	% fq
+	... look at output, can interrupt with C-c any time
+	without stopping the build ...
+
+Simple download queue, accessible from multiple terminals:
+
+	% mkdir -p /tmp/downloads
+	% alias qget='NQDIR=/tmp/downloads nq wget'
+	% alias qwait='NQDIR=/tmp/downloads fq -q'
+	window1% qget http://mymirror/big1.iso
+	window2% qget http://mymirror/big2.iso
+	window3% qget http://mymirror/big3.iso
+	% qwait
+	... wait for all downloads to finish ...
+
+As nohup replacement (The benchmark will run in background, every run
+gets a different output file, and the command line you ran is logged
+too.):
+
+	% ssh remote
+	remote% nq ./run-benchmark
+	,14f6f3034f8.17035
+	remote% ^D
+	% ssh remote
+	remote% fq
+	... see output, fq exits when job finished ...
+
 ## Assumptions
 
 `nq` will only work correctly when: