summaryrefslogtreecommitdiff
path: root/rc/bin/wdoc2txt
diff options
context:
space:
mode:
Diffstat (limited to 'rc/bin/wdoc2txt')
-rwxr-xr-xrc/bin/wdoc2txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/rc/bin/wdoc2txt b/rc/bin/wdoc2txt
new file mode 100755
index 000000000..bfb31fd93
--- /dev/null
+++ b/rc/bin/wdoc2txt
@@ -0,0 +1,17 @@
+#!/bin/rc
+
+switch($#*){
+case 0
+ exit
+case 1
+ switch($1){
+ case *.rtf
+ pub/rtf2text $1 >[2]/dev/null | plumb -i -d edit -a 'action=showdata filename='$1
+ case *.doc *
+ doc2txt $1 | plumb -i -d edit -a 'action=showdata filename='$1
+ }
+ exit
+case *
+ for(i in *)
+ wdoc2txt $i
+}