Archive for October, 2014

I have just installed the Crayon Syntax Highlighter plugin on this blog. Obviously a lot of the posts that I put here contain code snippets, so this great plugin will make that a little neater with feauters such as line numbers toggle, syntax highlight, copy into clipboard and many more. Over time I hope to […]

Sunday, October 26th, 2014 at 06:36 | 0 comments
Categories: Web

In this post we look at how text data can be transposed in a shell script. Suppose you have a comma-delimited text file (csv) which looks like this: 2014-10-01,Reading1,20.3 2014-10-01,Reading2,21.5 2014-10-01,Reading3,24.0 2014-10-01,Reading4,22.2 2014-10-02,Reading1,20.5 2014-10-02,Reading2,21.5 2014-10-02,Reading3,24.1 2014-10-02,Reading4,22.4 2014-10-03,Reading1,20.5 2014-10-03,Reading2,21.7 2014-10-03,Reading3,24.2 2014-10-03,Reading4,22.5 …and so on. Perhaps this is a set of sensor readings over a period of […]

Saturday, October 18th, 2014 at 15:50 | 0 comments
Categories: Linux

Suppose you have a monthly process to archive some data such as log files etc. Each month a separate archive file is created, and so after a few months you will have several archive files – for example as shown below: archive.2014-08.tar.gz archive.2014-09.tar.gz archive.2014.10.tar.gz Now if you wish to extract your data from all three […]

Saturday, October 18th, 2014 at 07:48 | 0 comments
Categories: Linux