align: text column alignment filter | ||||||||||||||
|
||||||||||||||
Align is a general-purpose text filter tool that helps vertically align columns in string-separated tables of input text. With whitespace-separated columns, you can often use it without arguments and it'll guess the right thing to do. Otherwise, you can specify arguments to direct how the columns are separated on input and rejoined in the aligned output. For example, $ head -5 access.log Here, align correctly guessed that columns were separated by a single space character and generated an alignment using multiple spaces between columns. Also, the type of alignment within a column can be specified to be left, right, center, numeric or zero-padded numeric. Also included in this package is width, another general-purpose text filter tool that helps you work with the printing width or length of lines of input text. For example, it can print the width, location and/or content for its longest line or lines of input, or for all lines. For example, % head -5 access.log | width -awnl Running align -h and width -h will provide complete usage summaries. |
||||||||||||||
"align" and "width" are Perl scripts that you should be able to install as-is, ie executable in a directory in your PATH. Edit the first line of the scripts, if necessary, to contain the proper path to your perl executable. Alternately, you can use the supplied Makefile to do all this. Just edit the top of the Makefile to your desires and then run: make |
||||||||||||||
align These programs are free software; you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. These programs are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with these programs (see the file "COPYING"); if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||||||||||||
|
||||||||||||||
Steve Kinzler
<steve@kinzler.com>
https://kinzler.com/me |
||||||||||||||
<steve@kinzler.com>, a Kinzler.com offering | ||||||||||||||