ACC SHELL
/**
* File:
* proc_partitions.scr
* Summary:
* SCR Agent for reading /proc/swaps
* Access:
* read
* Authors:
* Johannes Buchhold <jbuch@suse.de>
*
* Example: /proc/swaps
* Filename Type Size Used Priority
* /dev/hda2 partition 136544 82256 -1
*
* ...
**
* Read(.proc.swaps)
* ([ $["file":"/dev/hda2", "type": "partition", "size":"136544",
* "used": "82256" , "priority": "-1"],
*
* ...
* ])
*
* $Id: proc_partitions.scr 45868 2008-03-29 21:31:26Z aschnell $
*
*/
.proc.partitions
`ag_anyagent(
`Description (
(`File("/proc/partitions")), // real file name
"major\n", // Comment
false, // read-only
(`List (
`Tuple (
`Separator ("\t "),
`major (`Number()),
`Separator ("\t "),
`minor (`Number()),
`Separator ("\t "),
`size (`Number()),
`Separator ("\t "),
`name (`String("^\n\t ")),
`Optional (`String("^\n"))
),
"\n"
))
)
)
ACC SHELL 2018