mirror of
https://github.com/notwa/rc
synced 2024-11-14 13:59:02 -08:00
3 lines
131 B
Bash
Executable file
3 lines
131 B
Bash
Executable file
#!/usr/bin/env bash
|
|
COLUMNS=${COLUMNS:-$(tput cols)}
|
|
awk -vL=${1:-$COLUMNS} '{e=length>L?"…":"";print substr($0,0,L-(e?1:0)) e}'
|