You could maybe simplify the above script a little. You might also want to format the output so that your pyramid does not become skewed...
Code:
awk '
$0==0{i=++j}
{rows[i++]=rows[i]sprintf("%5s",$0)}
END {
for (i=1; i<=j; i++) {
print rows[i]
}
}' yourFile
And if you wanted to reflect your pyramid, you would do it like this...
Code:
awk '
$0==0{i=++j}
{rows[i++]=rows[i]sprintf("%5s",$0)}
END {
for (i=1; i<=j; i++) {
printf rows[i]
for (k=i+1; k<=j; k++) {
$0=rows[k]
printf("%5s",$i)
}
printf"\n"
}
}' yourFile
Damian