align-columns
Quick Start
- Command:
printf 'a\t1.2\nlonger\t10.35\n' | PATH=/home/vimalinx/miniforge3/envs/bio/bin:$PATH /home/vimalinx/miniforge3/envs/bio/bin/align-columns -a ln - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/align-columns - Full reference: See references/help.md for complete options
When To Use This Tool
- Make tab-delimited tables easier to read in the terminal or in generated reports.
- Align numeric columns on decimal points while leaving text columns left- or right-justified.
- Inspect width requirements or add extra spacing before sharing intermediate outputs with humans.
Common Patterns
# 1) Left-align text and decimal-align numbers
printf 'a\t1.2\nlonger\t10.35\n' | \
PATH=/home/vimalinx/miniforge3/envs/bio/bin:$PATH \
/home/vimalinx/miniforge3/envs/bio/bin/align-columns -a ln
# 2) Use the built-in default layout shortcut
printf 'col1\tcol2\nx\ty\n' | \
PATH=/home/vimalinx/miniforge3/envs/bio/bin:$PATH \
/home/vimalinx/miniforge3/envs/bio/bin/align-columns -
# 3) Print only computed widths
printf 'a\t1.2\nlonger\t10.35\n' | \
PATH=/home/vimalinx/miniforge3/envs/bio/bin:$PATH \
/home/vimalinx/miniforge3/envs/bio/bin/align-columns -a w
Recommended Workflow
- Start from tab-delimited input with a consistent column count.
- Choose an alignment string with
-a, remembering that the last letter repeats for remaining columns. - Tune indentation and spacing with
-hand-gonly after the basic alignment mode looks right. - Use the aligned output for human inspection, not as the canonical machine-readable representation.
Guardrails
- This wrapper relies on
transmute; calling the absolute path without the bio / EDirect bin directory onPATHcan fail withtransmute: command not found. -help,--help, andhelpwork, but-versionis noisy in this environment because it delegates toeinfo -version, which prints an error banner instead of a clean version string.- The script expects tab-delimited input, despite many autogenerated summaries calling it a general whitespace aligner.
- Alignment letters are applied column-wise, with the last specified letter repeated for any remaining columns.