[vox-tech] bash question
Bill Kendrick
vox-tech@lists.lugod.org
Wed, 8 Jan 2003 12:05:52 -0800
On Wed, Jan 08, 2003 at 11:48:38AM -0800, Matt Holland wrote:
> Hey all, I'm trying to automate some grunt work, and for the life of me,
> I can't figure out where I'm going wrong. Here's a simplified version
> of what I'm trying to do:
>
> -----
> #!/bin/bash
>
> # testrun.sh -- run the simulations to be done in the current directory
> #
> # usage: testrun.sh <prog>
> # where <prog> is the program to be run on all of the input files
>
> for I in *.in
> do
> J=`basename $I .in`
> "$1 > $J.out";
The thing you're doing here is trying to run the command:
hello > 0001.out
rather than trying to run the command:
hello
and then redirecting the output (">") to the file 0001.out :^)
Try:
"$1" > "$J.out";
maybe?
-bill!