Hi,
I e-mail a file of system stats each day and want to straighten out the output for the "df" command. I put together an awk file, but the tabs are longer than necessary and exceed the 80-columns of output required.
I can straighten out the columns using awk as follows:
$ df | awk -f df.awk
$ cat df.awk
# df.awk -- precisely print df output
# input -- output from df (in AIX)
{ printf("%-20s\t%-14s\t%-14s\t%-12s\t%-10s\t%-15s\n", $1, $2, $3, $4, $5, $6)
}
Does anybody know how to make a shorter tab with awk?
-Brent
I e-mail a file of system stats each day and want to straighten out the output for the "df" command. I put together an awk file, but the tabs are longer than necessary and exceed the 80-columns of output required.
I can straighten out the columns using awk as follows:
$ df | awk -f df.awk
$ cat df.awk
# df.awk -- precisely print df output
# input -- output from df (in AIX)
{ printf("%-20s\t%-14s\t%-14s\t%-12s\t%-10s\t%-15s\n", $1, $2, $3, $4, $5, $6)
}
Does anybody know how to make a shorter tab with awk?
-Brent