On Wed, 23 Jul 2003, Phil Taylor wrote:
> Actually I'd rather have them as plain text, since I
> have any number of seraching and indexing programs I
> can use with that.
If that's all you want, it's trivial. Open a text
file, call it "man2txt.c" and give it the following
contents:
<<
#include <stdio.h>
int main (void) {
char prev = 0, cur = 0 ;
cur = getchar () ;
while (!feof (stdin)) {
if (cur == 8) {
cur = 0 ;
} else if (prev != 0) {
putchar (prev) ;
}
prev = cur ;
cur = getchar () ;
}
return 0 ;
}
>>
save it. Then compile it as follows:
gcc -o man2txt man2txt.c
Now all you need to do is the following:
man vi | ./man2txt > vi.txt
Enjoy!
Groeten,
Irwin Oppenheim
[EMAIL PROTECTED]
~~~*
Chazzanut Online:
http://www.joods.nl/~chazzanut/
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html