changeset 130:5efc3985d513

handle multiple L-M lines :-(
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Fri, 09 Jul 2021 13:46:10 +0000
parents b51d65ed6c89
children bf943a2f0f37
files bin/clm.sh
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/clm.sh	Fri Jul 09 13:45:43 2021 +0000
+++ b/bin/clm.sh	Fri Jul 09 13:46:10 2021 +0000
@@ -1,3 +1,4 @@
 #!/usr/bin/bash
-{ egrep '^Last-Modified: ' || echo ; } | cut -f 2- -d ' ' >> "$1"
+egrep '^Last-Modified: ' | cut -f 2- -d ' ' | tr -d '\r' | { readarray -t a ; IFS=';' ; printf "${a[*]}" ; } >> "$1"
+echo >> "$1"