expand

Convert tabs to spaces. More information: <https://www.gnu.org/software/coreutils/expand>.

Install

All systems
curl cmd.cat/expand.sh
Debian Debian
apt-get install coreutils
Ubuntu
apt-get install coreutils
Alpine
apk add coreutils
Arch Arch Linux
pacman -S coreutils
image/svg+xml Kali Linux
apt-get install coreutils
CentOS
yum install coreutils
Fedora
dnf install coreutils
Windows (WSL2)
sudo apt-get update sudo apt-get install coreutils
OS X
brew install coreutils
Raspbian
apt-get install coreutils
Docker
docker run cmd.cat/expand expand powered by Commando

Convert tabs to spaces. More information: <https://www.gnu.org/software/coreutils/expand>.

  • Convert tabs in each file to spaces, writing to `stdout`:
    expand path/to/file
  • Convert tabs to spaces, reading from `stdin`:
    expand
  • Do not convert tabs after non blanks:
    expand -i path/to/file
  • Have tabs a certain number of characters apart, not 8:
    expand -t=number path/to/file
  • Use a comma separated list of explicit tab positions:
    expand -t=1,4,6

© tl;dr; authors and contributors