cannot print the columns i want with awk.

hi friends!

i have a script where a execute a veritas command, available_media wich retrieves me a list of tapes .lst

then i execute

cat /tmp/listtapes.lst | grep -v VL |sed '/^$/d'|awk -F, '{print $1, $3, $4, $9}
' > /tmp/media1.lst

but it prints all the columns instead of the four i�m orderin with awk...

anyone can help me??

maybe the cause is that veritas command generates spool headers like this and is not compatible.

THANKS IN ADVANCE!

Archiving pool

ARC001 HCART3 TLD 1 613 - 23 42214144 ACTIVE
ARC002 HCART3 TLD 1 617 - 18 4148480 ACTIVE

CatalogBackup pool

NDC004 HCART3 TLD 2 92 - 11 678420184 ACTIVE
NDC001 HCART3 TLD 2 94 - - - AVAILABLE

awk 'NF && !/VL/{print $1, $3, $4, $9}' /tmp/listtapes.lst 

If the output of listtapes is something like what you've copied there, why would you put that -F, ?

THANKS A LOT!!

thanks very much!! :))))))))))))))))))

perfect!!!!