Jeff Abrahamson on 24 Nov 2003 22:19:01 -0500 |
I recently attended a talk by Dennis Richie, one of the original authors of unix. I thought later that I ought to have attempted to ask him the following question: He (or one of his colleagues) once said, in espousing unix's tools approach to commands, encouraged the use of text, calling it the universal interface. Indeed, one of the reasons that the selection of tools available to us in unix is so rich is that so many tools take text as both input and output. It allows me to pipe this email through (grep foo | awk '{print $2}' | sort -u | wc -l) or some other such thing probably unanticipated by the author of any one tool. Thirty years passed, and we are beginning to see the rise of XML. A lovely thing, XML, but I see it pushing aside many venerable text-based file formats. Where once we might have been happy to let some tabs or spaces or colons provide our documents with structure, now we want XML. But, as rich and valuable as XML is, it makes ad hoc tool use more difficult. For example, if we were designing unix today, we might spec the system files to use XML. But, for example, now I might say grep /bin/bash /etc/passwd | wc -l to find out how many users have set bash as their login shell, I'm not sure how I could do that in a single line if /etc/passwd were /etc/passwd.xml. What are we losing, I would have asked Richie, as more and more files become XML? I know some of you, especially sys admins, have extensive experience both with XML and with the need to query in an ad hoc way using these text-based tools. What are your experiences, pro and con, with this issue? -- Jeff Jeff Abrahamson <http://www.purple.com/jeff/> GPG fingerprint: 1A1A BA95 D082 A558 A276 63C6 16BF 8C4C 0D1D AE4B Attachment:
pgpNAW6gMX19e.pgp
|
|