Re:Rich Command Shells
by qznc on Friday October 10, 2014 @05:01AM
(#8436838)
Interesting. Why do you think that files are good abstraction for a web shell?
[ Parent
| on HN ]
It's the old "if you have a hammer, everything looks like a nail". Since I'm a filesystem engineer, everything looks like a file :)
Seriously though: the file is a powerful and familiar abstraction. The primary motivation for pigshell was to provide a common minimum abstraction across different web APIs which would enable basic data movement and backup.
That said, pigshell commands actually pass objects across the pipeline; files are a kind of object. For instance,
cat http://pigshell.com/sample/life-expectancy.html | table2js -e "tr" foo country data | head | printf
extracts data from an html table, converts them to plain Javascript objects and prints their json representation.