haha, how stupid am I to not think about using a regular expression while
my first 4 months of stage were a 7 hour a day of learning/creating
regular expressions.. well, I don't know sed (the s/$regexp/$something/g I
know, but not the /$regexp/p ?? is it /p == /print ?) so I don't think of
using it automatically... + I don't like using regexps in the shell
because the shell interprets [ ] and you end up escaping all chars and
it's a mess!
anyways, your mail was very instructive and take you for helping me! I'll
put up a script that does that in a while and send the info about where to
find the results...
thx again
KKRT
On Thu, 12 Jan 2006 04:11:12 -0500, Arieh Schneier
<[EMAIL PROTECTED]> wrote:
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
--
KaKaRoTo
-------------------------------------------------------
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