Re: [GSoC] Machine readable output from userland utilities

看板FB_hackers作者時間11年前 (2014/05/21 14:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串7/29 (看更多)
> > On 5/20/14, 9:58 PM, Chris H wrote: >>> >>> Basically the idea would be to write a simple tool that is able to >>> extract using an xpath or json selector. >>> >>> Example (very rough code): >>> >>> ifconfig --output xml | selector --format xml --path /name --path >>> /name/etheraddr | \ >>> while read name ether ; do >>> echo "Interface $name has hardware address $ether" ; >>> done >>> >>> In all seriousness though, the real target is people writing higher >>> level languages (than shell) on top of FreeBSD. Perhaps python or ruby >>> spawning a utility and then that utility making the output easy to read. >>> >>> One thing to note is that the output should not just be formatted but >>> normalized as well. The fact that "uptime" can emit 15 different >>> formats for the uptime string is terrible for people coding on top of >>> the base utils, the json/xml/other output should be decided on some form >>> of normalized data likely in seconds + microseconds or something, but >>> anything truly machine readable is better than the current output when >>> popen'd by a webapp. >>> >>> -Alfred >> Greetings, all. >> I may be getting into this thread a bit late in the game. But if I >> understand the gist of this correctly; isn't all this pretty much what >> Perl was intended for? >> >> All the best. > > I can't tell if you're late or early since the connection is breaking > up, but from what I can make out you're stuck in 1997. LOL. That's good. :) I'm clearly missing something -- no, not the 21st century. ;) But just for the record; I meant nothing negative by my assertion. It just /seemed/ like Perl would/could be capable. --Chris > > -Alfred > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #1JV44UEO (FB_hackers)
討論串 (同標題文章)
完整討論串 (本文為第 7 之 29 篇):
文章代碼(AID): #1JV44UEO (FB_hackers)