Tags


http://wordpress.org/plugins/list-category-posts/

Info: http://en.support.wordpress.com/code/posting-source-code/

Examle:

</pre>
# begin
source="PAVAR10"
destination="EAVARD15"
startDate="10.2.2013 12:44:00"
endDate="10.2.2013 12:46:00"
type="Test"
rc="FAILED"
log="clone.log"
$(cat $log | sed -n -e 's/\([0-9][0-9]:[0-9][0-9]:[0-9][0-9]\)[&nbsp; ]*/\1|/p' > ${log}.tmp)
print "<?xml version=\"1.0\" ?>"
print "<cloneLog>"
print "<clone source=\"$source\" destination=\"$destination\" startDate=\"$startDate\" endDate=\"$endDate\" type=\"$type\" rc=\"$rc\">"
while read line
do
echo $line | awk 'BEGIN { FS="|" }
NF==0 { next }
NF==2 {
if ( length($2) > 0 ) {
if ($2 ~ /Error/&nbsp; ) { print "<msg level=\"Error\">" }
else if ($2 ~ /Warning/ ) { print "<msg level=\"Warning\">" }
else { print "<msg level=\"Info\">" }
{ print "<date>" $1 "</date>" }
{ l=length($2);print "<value>" $2 "</value>" }
{ print "</msg>" } }
}
NF!=2 {
printf("<error>Error! Line %d does not contain three fields. It contains [%s]</error>\n",NR,$0);
}'
done <"${log}.tmp"
print "</clone>"
print "</cloneLog>"
<pre>

select sysdate from dual;

Advertisements