changeset 41:ce13cad6b99d

Trim newline for sed argument
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 22 Jul 2015 16:36:08 +0900
parents 8cb89ace6110
children 0e3164b11ec0
files s4-blog.sh
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/s4-blog.sh	Wed Jul 22 16:27:00 2015 +0900
+++ b/s4-blog.sh	Wed Jul 22 16:36:08 2015 +0900
@@ -124,11 +124,11 @@
   hrefhome0="<a href=\"?home"
   for a in $arts; do
     arid=${a%%|*} aid=`echo "$a"|cut -d'|' -f2` author=${a##*|} imgs=""
-    ### err a=$a, aid=$aid, author=$author
+err a=$a, aid=$aid, author=$author
     # name=''	# Get gecos??
     td=$(echo $tmpd/`echo $a|md5`)
     val=`getvalbyid article image $arid $td`
-# err val="[$val]" and td as follows:
+err val="[$val]" and td as follows:
     
     if true; then
       if [ -n "$val" ]; then
@@ -139,7 +139,7 @@
 		       #data=`percenthex $td/$fn`
 		       #ct=`cat $td/$fn.content-type`
 		       ri=`cat $td/$fn.rowid`
-### err fn=$fn ct=$ct ri=$ri; ls -lF $td/ 1>&3
+err fn=$fn ct=$ct ri=$ri; ls -lF $td/ 1>&3
 		       #case $ct in
 		#	 [Ii]mage*) anch="<img src=\"data:$ct,$data\">$fn" ;;
 		#	 *) anch=$fn ;;
@@ -148,6 +148,7 @@
 		#       echo -n "<a href=\"$hrfb+$ri\">$anch</a>"
 			iconhref $td/$fn "$hrfb+$ri" "$fn" "$fn"
 		     done)
+	imgs=`echo "$imgs"|tr -d '\n'`	# kill newlines for sed
       fi
     fi
 

yatex.org