From bf194017fa44052fe8d2d7a4730f20b5b4881e47 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Thu, 15 Jan 2015 12:04:33 +0100 Subject: [PATCH] Updated Tips & tricks (markdown) --- Tips-&-tricks.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Tips-&-tricks.md b/Tips-&-tricks.md index 620d9ad..aff39f4 100644 --- a/Tips-&-tricks.md +++ b/Tips-&-tricks.md @@ -1,11 +1,13 @@ The following `bash` function pretty-print the entire comments DB sorted by insertion date. - get_blog_comments () { - ssh $host sqlite3 -line /path/to/isso/isso.db \ - "'SELECT t.uri,c.created,c.modified,c.text,c.author,c.email,c.website \ - FROM comments AS c, threads as t WHERE c.tid = t.id;'" \ - | perl -wpe '/(created|modified) = ./&&s/= (.*)/"= ".scalar(localtime($1))/e'; - } +```sh +get_blog_comments () { + ssh $host sqlite3 -line /path/to/isso/isso.db \ + "'SELECT t.uri,c.created,c.modified,c.text,c.author,c.email,c.website \ + FROM comments AS c, threads as t WHERE c.tid = t.id;'" \ + | perl -wpe '/(created|modified) = ./&&s/= (.*)/"= ".scalar(localtime($1))/e'; +} +``` Example output: