The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Help with scripting
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Help with scripting
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
10
(
permalink
)
05-14-2008
era
Herder of Useless Cats (On Sabbatical)
Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
That sounds like a simple printf specifier.
Code:
awk whatever ... | awk '{ printf ("%5s%6s%9s%5s%3s%35s%s\n", $1, $2, $3, $4, $5, $6, $7) }'
(Sorry, might have miscalculated the width of a few fields. Modifying the earlier script to do this is itself is probably not too hard either.)
I don't see anything which would be reducing $6 to just two characters.
era
View Public Profile
Visit era's homepage!
Find all posts by era
Find era's past nominations received
Find era's present nominations given