chanman525
IS-IT--Management
Hey all, I've got a file that I'm trying to clean up and look organized. The first column seems to be throwing everything off. Here is a copy of the printf function and how I am using it...
awk 'BEGIN { print "Equip DATE TIME LAST FIRST S990"
print "----- ---- ---- ---- ----------"}
{print $1" "$3" "$4" "$5" "$6" "$7}' /dcos/eis/log/busted2
and the output is the following...
Equip DATE TIME LAST FIRST S990
----- ---- ---- ---- ----------
LRT243 03/06/07 06:31 Yantis, Gene:S990GY1 334
LRT170 03/06/07 06:38 Gutierrez, Ranae:S990RG5 331
OTHPLM185 03/06/07 06:39 Garvey, Brian:S990BG4 335
OTHPLM184 03/06/07 06:43 Garvey, Brian:S990BG4 335
OTHPLM182 03/06/07 06:45 Byers, Charles:S990CB9 335
SPEC851 03/06/07 06:46 Byers, Charles:S990CB9 335
OTHPLM186 03/06/07 06:49 Martino, Ryan:S990RM6 335
SPEC848 03/06/07 06:49 Martino, Ryan:S990RM6 335
SPEC854 03/06/07 06:54 Martino, Ryan:S990RM6 335
If you can tell, when the first column is 3 characters longer on some lines, it throws the rest of the line off to the right. How do you get these to space out evenly?
awk 'BEGIN { print "Equip DATE TIME LAST FIRST S990"
print "----- ---- ---- ---- ----------"}
{print $1" "$3" "$4" "$5" "$6" "$7}' /dcos/eis/log/busted2
and the output is the following...
Equip DATE TIME LAST FIRST S990
----- ---- ---- ---- ----------
LRT243 03/06/07 06:31 Yantis, Gene:S990GY1 334
LRT170 03/06/07 06:38 Gutierrez, Ranae:S990RG5 331
OTHPLM185 03/06/07 06:39 Garvey, Brian:S990BG4 335
OTHPLM184 03/06/07 06:43 Garvey, Brian:S990BG4 335
OTHPLM182 03/06/07 06:45 Byers, Charles:S990CB9 335
SPEC851 03/06/07 06:46 Byers, Charles:S990CB9 335
OTHPLM186 03/06/07 06:49 Martino, Ryan:S990RM6 335
SPEC848 03/06/07 06:49 Martino, Ryan:S990RM6 335
SPEC854 03/06/07 06:54 Martino, Ryan:S990RM6 335
If you can tell, when the first column is 3 characters longer on some lines, it throws the rest of the line off to the right. How do you get these to space out evenly?