diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-07-31 17:26:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-07-31 17:28:32 -0700 |
commit | f8010dc6f95b967ffc6b653b33300e4b4d850c14 (patch) | |
tree | 46a5d790b2fdc14ace7a384f65b5e7f2be2cee75 /tests/002/query-1.txr | |
parent | 5c880c971907b6a55aac5649b0d07e9c748e6e5e (diff) | |
download | txr-f8010dc6f95b967ffc6b653b33300e4b4d850c14.tar.gz txr-f8010dc6f95b967ffc6b653b33300e4b4d850c14.tar.bz2 txr-f8010dc6f95b967ffc6b653b33300e4b4d850c14.zip |
txr-011 2009-09-25txr-011
Diffstat (limited to 'tests/002/query-1.txr')
-rw-r--r-- | tests/002/query-1.txr | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/002/query-1.txr b/tests/002/query-1.txr new file mode 100644 index 00000000..fd4db03b --- /dev/null +++ b/tests/002/query-1.txr @@ -0,0 +1,38 @@ +@# +@# This file is in the public domain. +@# It was authored by Kaz Kylheku <kkylheku@gmail.com> in 2009 +@# +@(next)!ls @TESTDIR/proc | sort -n +@(collect) +@{process /[0-9]+/} +@ (next)@TESTDIR/proc/@process/status +Name: @name +State: @state (@state_desc) +SleepAVG: @sleep_avg% +Tgid: @tgid +Pid: @proc_id +PPid: @parent_id +@(bind pid proc_id) +@(bind ppid parent_id) +@(skip) +Uid: @uid @/.*/ +Gid: @gid @/.*/ +@ (next)$@TESTDIR/proc/@process/task +@ (collect) +@thr +@ (end) +@ (bind thread thr) +@ (some) +@ (next)@TESTDIR/etc/passwd +@ (skip) +@user:@pw:@uid:@/.*/ +@ (and) +@ (bind user uid) +@ (end) +@(end) +@(output) +USER PID PPID S NAME THREADS +@ (repeat) +@{user 8} @{proc_id -5} @{parent_id -5} @state @{name 16} @(rep)@thr, @(first)@(last)@thr@(single)-@(end) +@ (end) +@(end) |