Originally Posted By: hybrid8
Ok, great. I should be able to get what I need with this.
Just have to figure out how to extend the ranges in the
last sub to include more valid characters like brackets, etc...

If I want to include a quote can I escape it with a backslash? Like so ' \" '

Yeah, except it can get very messy and confusing because the shell itself
may also try to interpret some things like that before passing
the strings to awk. So some double escapes might be needed.

It's because of that fuss, that I normally would just do
the whole script as an awk script rather than a bash script.
No double escaping needed, and a heck of a lot less confusing.

Awk is kinda nice for this stuff, with its C-like control structures
and free typing of things.
But difficult to remember if one only uses it once a year or less. smile

I use it weekly here -- my fav programming language!

Cheers


Edited by mlord (13/01/2009 21:34)