vendredi 17 avril 2009

nice awk tip !

- ex : to delete disks not belonging to rootvg :

lspv | grep -v rootvg|awk '{ print "rmdev -dl "$1 }'| ksh

Very useful to treat multiple lines commands in one line .... instead of the usual for i in ....

Aucun commentaire:

Enregistrer un commentaire