comparison s4-blog.sh @ 35:894f93ef24fe

g flag is meaningless because regexp is anchored at the bol
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 22 Jul 2015 13:26:31 +0900
parents 77e2aeb2d7ad
children ce13cad6b99d
comparison
equal deleted inserted replaced
34:77e2aeb2d7ad 35:894f93ef24fe
162 cat<<EOF | sq -html $db \ 162 cat<<EOF | sq -html $db \
163 | sed -e "s|,n,\([0-9]*\):|,n,$hrefhome0+\1\">|" \ 163 | sed -e "s|,n,\([0-9]*\):|,n,$hrefhome0+\1\">|" \
164 -e 's|,\[/a\],|</a>|' \ 164 -e 's|,\[/a\],|</a>|' \
165 -e 's/,n,/<br>/g' -e "s|,i,|$imgs|" \ 165 -e 's/,n,/<br>/g' -e "s|,i,|$imgs|" \
166 -e "s|<TR>\(<TD>\)|<TR id=\"$aid\">\1|" \ 166 -e "s|<TR>\(<TD>\)|<TR id=\"$aid\">\1|" \
167 -e "s|^href=\([-A-Za-z0-9,.:/~_%#&+?]*\)|<a &>\1</a>|g" \ 167 -e "s|^href=\([-A-Za-z0-9,.:/~_%#&+?]*\)|<a &>\1</a>|" \
168 -e "s|\(<TR.*>\)\(<TD>\),e,|\1\2$link|" 168 -e "s|\(<TR.*>\)\(<TD>\),e,|\1\2$link|"
169 select 169 select
170 coalesce((select ",e," from article where id='$aid' and author='$user'),"") 170 coalesce((select ",e," from article where id='$aid' and author='$user'),"")
171 || 171 ||
172 max(case key when 'ctime' then ",n,"||val|| 172 max(case key when 'ctime' then ",n,"||val||

yatex.org