Affichage des articles dont le libellé est awk. Afficher tous les articles
Affichage des articles dont le libellé est awk. Afficher tous les articles

mardi 27 septembre 2011

tips vi

passer des commandes shells directement dans le vi :

:1,$!awk '{ print $1 }


ou prendre en input chaque ligne et l’intégrer dans une commande :

:%!awk '{ system("host "$1)}'

mercredi 4 août 2010

ksh tip

simple way to get input caracter in the output text :

cat $i | bla bla | awk '{ var " " bla bla bla $1" "$2 bla bla }' var=$i >> out

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 ....