2010-11-07

grub2 dual boot

I have two hdd's, one sata named sda and an old ide named hdb. It has happened that I had to install Windows on the latter, and this is what I had to do in order to configure dual boot.

touch /etc/grub.d/15_windows
chmod a+x /etc/grub.d/15_windows

Then edit that file as follows:

#! /bin/sh -e
echo "Adding Windows" >&2
cat << EOF
menuentry "Windows XP" {
set root=(hd1,1)
drivemap -s hd0 hd1
#drivemap (hd0) (hd1)
#drivemap (hd1) (hd0)
#set root=(hd0)
chainloader +1
}
EOF

2010-03-15

how to retrieve document from filenet image manager

Useful scriptable commands to quickly retrieve documents from IM.

#
# prefetch
#
docfetch -s $ID

#
# store on file
#
echo "OBjecttofile 1 $SSN $ID 1 $BASEDIR/$ID.pdf" > $TMPFILE
echo "Q" >> $TMPFILE
CSM_tool < $TMPFILE

2010-01-21

oracle random function

You can find useful information here.

E.g.: Generating a random number from a range, between 1 to 1000.
SQL> select dbms_random.value(1,1000) num from dual;