Shell scripting

Extracting SCN range from an online redo log or archived redo log

Saturday, December 31, 2011
By Steve

I can’t imagine that this would be useful in a well managed system, but if you find yourself with a “raw” log file that is not in the dictionary, you can at least extract the SCN range it encompasses using what is below. $ awk --version GNU Awk 3.1.5 Copyright (C) 1989, 1991-2005... »

Converting ASCII to binary

Wednesday, December 14, 2011
By Steve

This is pretty useless, but I know some people like this kind of thing 10:11:42 oracle@emgrid01 ~ >echo "if you can read this you are a geek" | xxd -b | awk '{printf("%s %s %s %s %s %s ",$2,$3,$4,$5,$6,$7)} END {print "\n"}' 01101001 01100110 00100000 01111001 01101111 01110101 00100000 01100011 01100001 01101110 00100000 0111001... »

Creative ways to do simple things

Tuesday, December 13, 2011
By Steve

I always like exercises such as this, especially for interview questions. In an interview, I am never looking for the correct answer as often as I am how the question is answered, and how creative the person is. For example, if you were asked to use any tool imaginable, how would you format the... »