> IF someone is good enough in scripting, it would be nice to have a script
> that would grep these [TODO] and [FIXME] things and convert the line from
> html to text...
> (an idea :
> grep \[TODO\]  * > todo
> grep \[FIXME\] * > fixme
> cat todo fixme > list
> tclsh remove_html < list
>
> with remove_html as a tcl script that would parse line per line, when it
> finds a '<', it skips the letters until a '>' so all tags could be
> removed...

a script (not tcl) which does the removal of everything between < and >
could look like:
sed -e 's/<[^>]*>/ /g'

if you want to do the above all in 1 line without the necessity of temporary
files you could do this (note the newlines are necessary but are all
contained within the quotes):
sed -n -e '
s/<[^>]*>/ /g
/\[TODO\]/p
/\[FIXME\]/p' *

Or if you prefer you can put the 3 lines within the quotes into a file and
then run:
sed -n -f filename *

You could also add the line (add it as the second line):
s/[^\[]*\[/[/
which will remove everything up to the first [ (ie remove the time and
name), although you may like to keep those.

Lio



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Amsn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to