summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdoardo La Greca2025-05-09 21:17:42 +0200
committerEdoardo La Greca2025-05-09 21:17:42 +0200
commit57f8454995fdff50da8409583bd8c0da1c194ab7 (patch)
tree2c50864a561cf90e686b4c8a5cbccdeb904a12ba
parent170c948951b3a2baeb5396884227c68ab7b758d4 (diff)
output each file in a separate file when using folder.sh
-rwxr-xr-xsh/folder.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/sh/folder.sh b/sh/folder.sh
index dc1c097..fa26f43 100755
--- a/sh/folder.sh
+++ b/sh/folder.sh
@@ -2,5 +2,8 @@
# Fold and remove trailing white-space from files.
-fold -s "$@" | sed 's/[[:space:]]$//'
+for f
+do
+ fold -s "$f" | sed 's/[[:space:]]$//' >$f.fld
+done