Suitable for what?

There's one sort of modification you need to feed the 
output from find to xargs. That's done with -print0 on 
"find" and --null on "xargs".

There's another sort of modification that would be needed 
if you were turning the output from find into suitably 
escaped URL query strings. There's a perl module for 
that, but by default it doesn't give all the protection 
you want. If you give it an idea of the characters you 
consider troublesome, though, it does just fine.

find / | perl -MURI::Escape -ne 'chomp; print 
uri_escape($_, "^\\w-.\\/" ),"\n"'

This will turn each of your troublesome characters into 
their %xx hex equivalent.

If you're doing the sort of thing Derek suggested 
though, there are two different encodings you want to do 
at once, one for the URL and one for the HTML. To 
transform your list of files into a set of HTML links, 
then, you'd need something like this:

find / | perl -MHTML::Entitities -MURI::Escape -ne \
'chomp;print qq{<A href="http://host/},uri_escape( $_, \ 
"\\w-.\\/"),qq{">},encode_entities($_),"</A>\n"'

(and I sure hope I got all my quotes, parens, and 
brackets matched up right when I typed that!)

------------------------------------------------
Get the award winning ISP, AT&T WorldNet Service
http://download.att.net/webtag

*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to