summaryrefslogtreecommitdiff
path: root/rushs/tinyprintf/80cols
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:08:27 +0200
committerMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:08:27 +0200
commitc9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c (patch)
tree3e4f42f93c7ae89a364e4d51fff6e5cec4e55fa9 /rushs/tinyprintf/80cols
add: graphs et rushs
Diffstat (limited to 'rushs/tinyprintf/80cols')
-rwxr-xr-xrushs/tinyprintf/80cols/80cols.sh11
1 files changed, 11 insertions, 0 deletions
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