Bash A to Z and 0 to 9

When you run a bash command, e.g. grep, and you need to take in account the letters A to Z and 0 to 9, you can use the following syntax:

for i in {{a..z},{A..Z},{0..9}}; do echo $i; done

From here you can take it further.

It came in hand when I was searching for a value in the session directory and the grep could not accept the * value because there were too many files, so I ran this:

for i in {{a..z},{0..9}}; do grep "something" sess_$i*; done

And I got my results as expected.

Piwik 1.8.4 upgrade – empty data

I use Piwik for analytics, on my sites and my clients, it is a great open source tool, like really great.

Recently I updated a self hosted Piwik by one of my clients, and since the update the “Crunched” data would not appear, empty graphs and empty bars.

The weird thing was that raw data was coming in, and the visitor log was active.

So I looked around, I did not want to do something that might make it worse, and I found this FAQ, and option 4 did the trick 🙂

I guess this is sort of an FYI post, enjoy and spread open-source.