A new beginning

I got hired at my old job. I’m very happy for that. They’re happy I came back! Saves them money and time on training, and the off-chance of hiring a ‘lemon’ that quits after 4 weeks. I’ve entered into a Digital Forensics project. I need to develop a tool that will automate some of the labourious tasks involved in digital forensic evidence acquisition. I’ll probably need to brush up on GNU Bash scripting, and PHP.

It’s been very warm here, but not too hot, which I like. Yesterday was a bitch, though, felt like 30°C. Fortunately, today was overcast, and so helped to alleviate some of the scorching.

Happiness

Health

1. Drink plenty of water.

2. Eat breakfast like a king, lunch like a prince and dinner like a  beggar.

3. Eat more foods that grow on trees and plants and eat less food  that is manufactured in plants..

4. Live with the 3 E’s — Energy, Enthusiasm and Empathy

5. Make time to pray.

6. Play more games Continue reading

Incheon, Korea (near Seoul)

Flight was good. Good food, Good service. I’m very happy with korean Airlines, and I’d travel with them again, just maybe not from Toronto to Brisbane (Brisbane to Toronto, however, was flawless, arguably the best flight I’ve ever taken in my life).

These are pictures of the free Hotel room Korean Air set me up with. I had to wait 16 hours for my next flight. They provided me with a free lunch coupon, but I got hungry by 7:00 AM and just looked for a decent local joint to satisfy my kimchee and bibimbap craving.

Excuse the poor quality pics – they were taken with my laptop’s webcam.

Regular Expression

Previously we have an example on regular expression, but It doesn’t shows the power of square brackets ( [ ] )

Let say you want to search for string fprintf, vprintf and sprintf using grep, usually what you do is

egrep "fprintf|vprintf|sprintf" *.c

You may be ask why don’t just uses the word “printf”? If uses the word printf, it will return all of them but also include printf itself. But in this case i don’t want to grep other printf besides f,v,s printf. Thats the square brackets comes in to lessen your trouble.

egrep "[sfv]printf" *.c

It simply return the result with any character specified in [ ] with word printf concatenated.

The square brackets can be used with other RE symbols, here is another example, let say I want to gets all lists with words start with a character “a to f”, I can do this

egrep "^[a-f]" com-book.txt

It is case sensitive, I want all a to f including the upper case A to F.

egrep "^[a-fA-F]" com-book.txt

Copyright: ByExample.com