need help on korn passing param

Hi,

I need to script this:

lsvg -l vg10|grep -v vg10:|grep -v LV|awk '{print "chlv -u 2 ",$1}' > script_vg10.sh

So that I could just pass the parameter of the volume group.

When I did this on a script:

#!/bin/ksh
lsvg -l %1|grep -v %1:|grep -v LV|awk '{print "chlv -u 2",$1}' > script_%1.sh

I got this error (with param of vg10):

0516-306 lsvg: Unable to find volume group %1 in the Device
Configuration Database.

Thank you in advance,
Itik

%1 is a DOS parameter. Too much u$-DOG scripting lately?

In Bourne-compatible shells, the parameters are $1 $2 $3 etc.

As an aside, the complex grep | grep | awk should probably be refactored. Something like

lsvg -l $1 | awk "!/($1|LV)/� print "chlv -u 2, $1" }'

I just need to change the % to $. Your script got error...

thanks

Yeah, I noticed. Sorry about that. (You're grammer gotz bigg bigg error too man!)

lsvg -l $1 | awk '!/('"$1"'|LV)/ { print "chlv -u 2", $1 }'

Thanks. It's fixed too.