On 7/11/05, Stewart Stremler <[EMAIL PROTECTED]> wrote:
> begin quoting Todd Walton as of Sun, Jul 10, 2005 at 10:24:08PM -0700:
> [snip]
> > You must specify the name of the input file (duh), and the name of the
> > output file that it will create.
>
> You can't give it stdin and redirect stdout?
No. It's not very flexible in that regard. Whatever you give it, it says:
Usage: /usr/bin/wvText <word document> <text output file>
> > #!/bin/bash
>
> Why? I don't see any bash-specific stuff going on here. What's wrong
> with sh?
Frankly, it's because I don't know the differences between bash and
sh, and I'd rather stick with bash and learn to use bash. The only
reason I can see for going with sh is portability, and I don't value
that for this application.
> > wvText $1 $1.txt
>
> In tcsh, you use stuff like :t and :r to to that. So something like:
>
> foreach i ( /dir/full/of/files/* )
> wvText $i ${i:t:r}.text
> end
>
> ...does a fine job.
I'll try that.
> wvText $1 `basename $1 .doc`.text
No go. When I create a shell script with this, and then run it on the
files, it doesn't work. Both:
$ myScript *
$ ls |xargs myScript
convert only the first file, and not the rest. This should work!
-todd
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list