[lug] Random access from the shell

Jeffrey Haemer jeffrey.haemer at gmail.com
Thu Nov 13 05:20:13 MST 2008


That's sick.

Though we could build pieces with "[[ $x =~ $y ]]", I think.

SAX or DOM?

On Wed, Nov 12, 2008 at 11:10 PM, David L. Anselmi <anselmi at anselmi.us>wrote:

> Jeffrey Haemer wrote:
>
>> Yesterday, Jeremy and I were talking about how to do random access I/O
>> from
>> the shell.
>>
>
> That's pretty cool.  I'm surprised how many things that you wouldn't seem
> to use shell for turn out to be rather elegant when someone actually sits
> down and does them.
>
> So what I'd like to see is a way to parse XML in the shell.  Sure, it's
> easy in perl, Java, and whatever.  But how to parse an XML file and then
> write a script using the interesting bits?
>
> I had a problem like that at work and solved it with perl and a wicked
> regex (only one line was interesting so it wasn't worth learning how to
> parse the XML).  perl was better than shell in that case because I was doing
> enough text manipulation to make shell cumbersome.
>
> But I could easily see wanting to do more complex parsing but less complex
> processing where a shell XML parser would be handy.  Anyone seen one?
>
> Dave
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
>



-- 
Jeffrey Haemer <jeffrey.haemer at gmail.com>
720-837-8908 [cell]
http://goyishekop.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20081113/990d2d69/attachment.html>


More information about the LUG mailing list