s4
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 diff
1.1 --- a/s4-blog.sh Wed Jul 22 16:27:00 2015 +0900 1.2 +++ b/s4-blog.sh Wed Jul 22 16:36:08 2015 +0900 1.3 @@ -124,11 +124,11 @@ 1.4 hrefhome0="<a href=\"?home" 1.5 for a in $arts; do 1.6 arid=${a%%|*} aid=`echo "$a"|cut -d'|' -f2` author=${a##*|} imgs="" 1.7 - ### err a=$a, aid=$aid, author=$author 1.8 +err a=$a, aid=$aid, author=$author 1.9 # name='' # Get gecos?? 1.10 td=$(echo $tmpd/`echo $a|md5`) 1.11 val=`getvalbyid article image $arid $td` 1.12 -# err val="[$val]" and td as follows: 1.13 +err val="[$val]" and td as follows: 1.14 1.15 if true; then 1.16 if [ -n "$val" ]; then 1.17 @@ -139,7 +139,7 @@ 1.18 #data=`percenthex $td/$fn` 1.19 #ct=`cat $td/$fn.content-type` 1.20 ri=`cat $td/$fn.rowid` 1.21 -### err fn=$fn ct=$ct ri=$ri; ls -lF $td/ 1>&3 1.22 +err fn=$fn ct=$ct ri=$ri; ls -lF $td/ 1>&3 1.23 #case $ct in 1.24 # [Ii]mage*) anch="<img src=\"data:$ct,$data\">$fn" ;; 1.25 # *) anch=$fn ;; 1.26 @@ -148,6 +148,7 @@ 1.27 # echo -n "<a href=\"$hrfb+$ri\">$anch</a>" 1.28 iconhref $td/$fn "$hrfb+$ri" "$fn" "$fn" 1.29 done) 1.30 + imgs=`echo "$imgs"|tr -d '\n'` # kill newlines for sed 1.31 fi 1.32 fi 1.33