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