….., but do it right – How to install an Oracle Database – part 2


So the “server” for my oracle database has been installed. Next I will install the Oracle RDBMS. Sadly Oracle is the most popular RDBMS because it was considered the fastest, but it’s not the database that makes your application fast – it’s your application which makes your database slow. So my articles on Oracle are just the beginning, because there are a number of good candidates out there.Continue reading →

….., but do it right – How to install an Oracle Database – part 1


This is not my latest cookbook, but one of my most valuable. It comes in several chunks, because I will also deal with the prerequisites.
The really interesting stuff will start with part 4.
The guide is intended to developers who are in the need to install an oracle database to create a working development environment. This situation is not so rare and unfortunately often enough you find a default database automatically created by the oracle installer. When moving to a real live environment, this is an embarrassment.Continue reading →

Shell programming part x+1 – Arbitrary precision computing using shell script

There are these occurrences when you need a calculation be a little more exact. Here is how you get this accomplished.

There are two important things shown in this section:

  1. How to do this computation
  2. How to invoke external commands and redirect their stdout into one of your variables.

I will revisit this example at a later point.

In order to work with rational and real numbers in a shell script we need bc as an additional command. You may call bc on the command line and use it for your ad hoc computations. Sometimes it’s just easier than grabbing the mouse to open the graphical instance of what once was our pocket calculator. bc is the arbitrary precision calculator language. So it probably will be capable of lots more than what I am showing here. Please refer to the man page using man bc

To begin with, I would like to repeat a few things, that actually should have been published before. As I am publishing this stuff out of order, the one or the other thing might not have been mentioned yet.

  • The character ‘#‘ starts a comments
  • #! causes the current shell to pass the following script to the program whose path is following directly after.
    • #!/bin/sh
  • causes the following script to execute the bourne shell or korn-shell or c-shell, whatever you like
  • When a command has a leading and a trailing 0x60-character (`) The command (or command sequence is executed in a subshell and the output of that subshell is then redirected into the current shell. it may be assigned to a variable or it goes from there to the stdout of the current shell.
    It looks like this:

    username=id -n -u`
    echo $username

And now the sample script:


let zahl1=4711
let dp=2        # decimal place
let div=15

s_res=`echo $zahl1"/"$div | bc -l`   # The result will be 314.066666666666666666
                                     # The result is treated as a string
t1=`echo $s_res | cut -d "." -f 1`   # Separate the number represented by the
                                     # string into two parts
                                     # take the integer part and assign it to t1
t2=`echo $s_res | cut -d "." -f2`    # now take the second part and assign it to
                                     # t2
                                     # Now we deal with the value .06666666....
t3=`echo $t2 | cut -b 1-$dp`         # cut of the first two bytes of t2
                                     # here in this example we have two decimal
                                     # places
s_res=$t1$t3                         # concatenate the two fields. The result
                                     # is not yet rounded.
set n_res=$s_res                     # now it's a number
let r_pos=$dp+1                      # The decimal position, we are using to
                                     # round is one past the position, we want
                                     # in our result.
# It is important that we think a little about rounding!
# Depending on the problem domain there are very specific rules on rounding.
# So before you start rounding you need to consult your client and preferably
# get a written specification from him/her.

let r_fig=`echo $t2 | cut -b $r_pos`   # Now the number 6 is stored in r_fig

if [[ $r_fig -ge 5 ]] ; then           # the rounding rule I am using here, is
    let n_res=$n_res+1                 # simple.
                                       # in this example the value in n_res now
                                       # is 31407
                                       # Now we need to move the decimal point
end_res=`echo $n_res"/10^"$dp | bc -l` # by two positions
echo $end_res                          # yeah, this is it: 314.07000000000000000

Of course after this process, the result will be 314.07000000000000000 but in this script you have seen all steps to format it at your convenience.

Did your media report this? – to be continued

8th of Sivan 5775

It is common, that Western citizens are unaware about the rocket fire from Gaza at Israel and they are only kept updated about Israel’s action against the Gazan terrorist groups. The impression then is, that Israel’s action against Gazan terrorist groups was totally unjustified and excessive.

Tuesday, May 26th 2015

At least one rocket fired from Gaza hits southern Israel (TOI)
After four weeks of silence, Gaza rocket explodes in the South (JPost)
IDF: One Gaza rocket lands near Gan Yavne (Ynet)

Rocket Fired from Gaza Hits Southern Israel (Arutz 7)
רקטה התפוצצה באזור גן יבנה; אין נפגעים (walla)
רקטה נפלה בדרום, בעזה נערכים לתגובת ישראל (Ma’ariv)

derstandard.at did!
theguardian did! (But of course, the guardian cannot just report the instance without putting blame on Israel.)
And? zeit.de, welt.de, spiegel.de, nzz.ch, faz.net, washingtonpost.com, nytimes.com, lemonde.fr, corriere della sera they and many others ignored it.

I am starting this list today, because on the first look there is no real reason that explains such an action from Gaza. Actually everything is calm (up to now) There are rumors, about Israel having secret negotiations with Hamas ….. and now this? Of course there is a reason. Iran is cutting down its support for Islamic Jihad’s because of their position on Iran’s role in Yemen.

Only a few days ago, there was a report that Hamas announced it was ready for a new war with Israel: Hamas: Ready for long war unless Israel accepts truce demands
We call this blackmail and not negotiation.