In J, is there a way to read /proc files in Linux (for example to get network
stats, or process info etc)?(/proc info:
http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html )
For example, in Python, if I wanted to read sockstat, I might do:
def get_info(path): f = open(path,'r') return
f.readlines()
if __name__ == '__main__':
map(lambda x: print(x), get_info('/proc/net/sockstat'))
In J, to get the same functionality I am using
]data =. spawn_jtask_ 'cat /proc/net/sockstat'
Is there a way to get this information without using Jtask?
1!:1 does not work, but is there another verb to do this?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm