| Ed Morton 2006-01-13, 10:40 pm |
| contracer11@gmail.com wrote:
> Please, could you tell me what´s wrong in this script ?
>
> #!/bin/ksh
> /usr/openv/volmgr/bin/vmcheckxxx -rt tld -rn 0 -list | awk '{ print $3,
> $1 }' >
> fnr0
> /usr/openv/volmgr/bin/vmcheckxxx -rt tld -rn 1 -list | awk '{ print $3,
> $1 }' >>
> fnr0
> /usr/openv/netbackup/bin/admincmd/bpmedialist -l |
> while read a b c d e f g h i j k l m n o p q r s t u v w x y
> do
> if [ $o = "8" ]
> then
> grep $a fnr0
> if [ $? -eq 0 ]
> then
> echo $a
> fi
> fi
> done
> exit 0
>
>
> Running the script I get:
>
> ./po2[2]: syntax error at line 3 : `newline or ;' unexpected
>
>
> Thanks in advance.
>
It's hard to tell with the line-wrapping, but it looks like the first
line where you invoke awk ends in ">" and the file you're trying to
direct it to (fnr0) is on the subsequent line.
Ed.
|