| Ed Morton 2005-11-16, 6:03 pm |
| tester wrote:
>
> the awk syntax was wrong. awk -F, '{print $1/$2}' $line
There's nothing wrong with that syntax. Looking back through the thread
(and please read http://cfaj.freeshell.org/google so that's not
necessary in future), I see this line:
srcpath=awk -F, '{print $1/$2}' $line
Now THAT is wrong, but it's not the awk syntax, it's the shell. It
should've been:
srcpath=`awk -F, '{print $1/$2}' "$line"`
assuming that "$line" is the name of as file, e.g. "Sample" as used below.
>
>
> temp file replaces comma delimiter with / and put in to the same logic
> as before with temp file.
If you fix your shell line as above, you don't need the tmp file.
>
Ah, now I see that awk line again. Please pay particular attention to
the part about "top-posting" in the page I referred you to.
Ed.
|