I have script that produces this result below - I'm trying to align the output into only 2 colums ..see below for the desired output. I'm using the following code, I need help tweeking it or a complete rewrite ..Thanks for any assistance.
awk '{printf("%-30s%-15s%-10s\n", $1,$2,$3,$4)}' ~/Desktop/LogReport.txt
Security and Maint Logs
========
system.log [ 42M ]
secure.log [ 522K ]
install.log [ 989K ]
windowserver.log [ 44K ]
alf.log [ 62B ]
appfirewall.log [ 68K ]
ipfw.log [ 120K ]
kernel.log [ 385K ]
fsck_hfs.log [ 96K ]
launchd-shutdown.log [ 316K ]
# Desired output
Security and Maint Logs
========
system.log [ 42M ]
secure.log [ 522K ]
install.log [ 989K ]
windowserver.log [ 44K ]
alf.log [ 62B ]
appfirewall.log [ 68K ]
ipfw.log [ 120K ]
kernel.log [ 385K ]
fsck_hfs.log [ 96K ]
launchd-shutdown.log [ 316K ]
awk '{printf("%-30s%-15s%-10s\n", $1,$2,$3,$4)}' ~/Desktop/LogReport.txt
Security and Maint Logs
========
system.log [ 42M ]
secure.log [ 522K ]
install.log [ 989K ]
windowserver.log [ 44K ]
alf.log [ 62B ]
appfirewall.log [ 68K ]
ipfw.log [ 120K ]
kernel.log [ 385K ]
fsck_hfs.log [ 96K ]
launchd-shutdown.log [ 316K ]
# Desired output
Security and Maint Logs
========
system.log [ 42M ]
secure.log [ 522K ]
install.log [ 989K ]
windowserver.log [ 44K ]
alf.log [ 62B ]
appfirewall.log [ 68K ]
ipfw.log [ 120K ]
kernel.log [ 385K ]
fsck_hfs.log [ 96K ]
launchd-shutdown.log [ 316K ]