From c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:08:27 +0200 Subject: add: graphs et rushs --- rushs/tinyprintf/80cols/80cols.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 rushs/tinyprintf/80cols/80cols.sh (limited to 'rushs/tinyprintf/80cols/80cols.sh') diff --git a/rushs/tinyprintf/80cols/80cols.sh b/rushs/tinyprintf/80cols/80cols.sh new file mode 100755 index 0000000..d66cf9b --- /dev/null +++ b/rushs/tinyprintf/80cols/80cols.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +[ $# -ne 1 ] && exit 1 +[ -f $1 ] || exit 1 + +while IFS='' read -r line; do + var=$(printf '%s' "$line" | wc -m) + [ "$var" -ge 80 ] && printf '%s\n' "$line" +done < "$1" + +exit 0 -- cgit v1.2.3