Add coloring by day by 'sed'.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 11 Nov 2011 10:34:17 +0200
changeset 822 836107c5c06f
parent 818 bbccd9875916
child 823 c1c5a6b3255a
Add coloring by day by 'sed'.
stmcrblog.sh
--- a/stmcrblog.sh	Thu Nov 10 13:35:15 2011 +0200
+++ b/stmcrblog.sh	Fri Nov 11 10:34:17 2011 +0200
@@ -30,7 +30,9 @@
 
   echo '<ul>'
 
-  sed -e 's|^\([[:digit:]-]\+\) \([[:digit:]:]\+\) \(.*\)|  <li><span style="color: green;">\1 \2</span> \3</li>|'
+  sed \
+    -e 's|^\([[:digit:]-]\+[02468]\) \([[:digit:]:]\+\) \(.*\)|  <li><span style="color: green;">\1 \2</span> \3</li>|' \
+    -e 's|^\([[:digit:]-]\+[13579]\) \([[:digit:]:]\+\) \(.*\)|  <li><span style="color: blue;">\1 \2</span> \3</li>|'
 
   echo '</ul>'