#awk one liner http://www.pement.org/awk/awk1line.txt http://tuxgraphics.org/~guido/scripts/awk-one-liner.html one-liner explained: http://www.catonmat.net/blog/sed-one-liners-explained-part-one/ # add text to the first line of a file #process scanmem output list #delete blank linessed '/^$/d #delete spaces in a line sed 's/^[\t]*//;s/[ \t]*$//' cat out|grep heap|grep 8,|awk '{print $1}'| sed 's/\[//'|sed 's/\]/,/'|sed 's/^[\t]*//;s/[ \t]*$//'|transpose.awk |tr -d ' ' #ssh check n001-n999 cluster nodes sh -c 'for i in $(seq -w 001 999); do echo "===n$i==="; ssh n$i "df -h"; done' |
Wiki >