From 74da6909c38af9c51a243649ba595a22c1fd39d4 Mon Sep 17 00:00:00 2001 From: yo Date: Mon, 20 Dec 2021 22:16:36 +0100 Subject: [PATCH] update doc with sort example --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 87635a1..8a17905 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,39 @@ gocage list -f Config.Boot=1,Running=true -o JID,Name,Running,Config.Boot +-----+----------+---------+-------------+ +Sort jails +---------- +Use -s switch followed by sort criteria. Criteria is a field name, prefixed with + or - for sort order (increase/decrease): +

+gocage list -f Config.Boot=1,Running=true -o JID,Name,Running,Config.Boot -s +JID
++=====+==========+=========+=============+
+| JID | Name     | Running | Config.Boot |
++=====+==========+=========+=============+
+| 22  | srv-dns1 | true    | 1           |
++-----+----------+---------+-------------+
+| 29  | bdd-tst  | true    | 1           |
++-----+----------+---------+-------------+
+| 183 | test     | true    | 1           |
++-----+----------+---------+-------------+
+
+ +You can use up to 3 criteria, delimited with comma: +

+gocage list -f Config.Boot=1,Running=true -o JID,Name,Running,Config.Boot -s +JID,+Name  
++=====+==========+=========+=============+
+| JID | Name     | Running | Config.Boot |
++=====+==========+=========+=============+
+| 22  | srv-dns1 | true    | 1           |
++-----+----------+---------+-------------+
+| 29  | bdd-tst  | true    | 1           |
++-----+----------+---------+-------------+
+| 183 | test     | true    | 1           |
++-----+----------+---------+-------------+
+
+ +OK the example is shitty as JID are unique. But this work, trust me! + + Stop jails ---------- `gocage stop test`