From 7dcbff5d337dc1666372c7b0b3c24832ec5dc00d Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 30 May 2020 13:41:12 -0500 Subject: Remove unneeded files --- fold.sh | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 fold.sh (limited to 'fold.sh') diff --git a/fold.sh b/fold.sh deleted file mode 100644 index ee88c6e..0000000 --- a/fold.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -fold() { - shopt -s checkwinsize - ( - : - : - ) - width="${1:-$COLUMNS}" - while read -r line; do - : "${line// / }" - IFS=$'\n' read -d "" -ra words <<<"${line// /$'\n'}" - ll=0 - for word in "${words[@]}"; do - wl="${#word}" - if ((ll + wl > width)); then - printf '\n' - else - ((ll += wl)) - printf '%s ' "$word" - fi - done - done -} - -fold "$@" -- cgit 1.4.1-21-gabe81