Hi all
Today a simple mode to check if a process was killed.
It is adding at the end of your script these two rows :
...
...
...
exitvalue=$?
echo "exit code of my program is " $exitvalue
When script ends it'll show his exit code.
For example if it was killed (kill -9) appears this message :
exit code of my program is 137
The exit code 137 is 128 + 9 so process ended for a "kill -9" command.
This is a table of HPUX Signal :
Signal Value Action Comment
-------------------------------------------------------------------------
SIGHUP 1 Term Hangup detected on controlling terminal
or death of controlling process
SIGINT 2 Term Interrupt from keyboard
SIGQUIT 3 Core Quit from keyboard
SIGILL 4 Core Illegal Instruction
SIGABRT 6 Core Abort signal from abort(3)
SIGFPE 8 Core Floating point exception
SIGKILL 9 Term Kill signal
SIGSEGV 11 Core Invalid memory reference
SIGPIPE 13 Term Broken pipe: write to pipe with no readers
SIGALRM 14 Term Timer signal from alarm(2)
SIGTERM 15 Term Termination signal
Stay Tuned.
This blog was created to improve my English and share news, thoughts and opinions about the world around me. I use it also to fix some technical solutions for future use.
lunedì 29 aprile 2013
martedì 9 aprile 2013
venerdì 5 aprile 2013
Regular Expression Library Site
Hi
I want report today the site http://regexlib.com/ about "Regular Expression".
A very good source of more than 3500 regular expression from thousand contributors.
Site presents a good search engine and is well done.
So to enjoy regex.
Stay Tuned.
I want report today the site http://regexlib.com/ about "Regular Expression".
A very good source of more than 3500 regular expression from thousand contributors.
Site presents a good search engine and is well done.
So to enjoy regex.
Stay Tuned.
martedì 2 aprile 2013
Oracle Nested Table - Create, Insert and Select
Hi all
Today i want to speak about oracle nested table.
Basically you can define in oracle a field that is a table inserted in other table. In Oracle system tables there are two tables used to manage this particular type of columns :
Now an example to test it.
1) Creation a Type :
CREATE OR REPLACE TYPE VALUELIST AS TABLE OF VARCHAR2(20);
2) Creation Table :
CREATE TABLE NESTED_TABLE
( ID NUMBER NOT NULL,
FIELD1 VALUELIST)
NESTED TABLE FIELD1 STORE AS field1_tab;
Today i want to speak about oracle nested table.
Basically you can define in oracle a field that is a table inserted in other table. In Oracle system tables there are two tables used to manage this particular type of columns :
- USER_NESTED_TABLES : Nested Table List
- USER_NESTED_TABLE_COLS : Nested Table List Columns
Now an example to test it.
1) Creation a Type :
CREATE OR REPLACE TYPE VALUELIST AS TABLE OF VARCHAR2(20);
2) Creation Table :
CREATE TABLE NESTED_TABLE
( ID NUMBER NOT NULL,
FIELD1 VALUELIST)
NESTED TABLE FIELD1 STORE AS field1_tab;
3) Inserting values in table :
INSERT INTO nested_table VALUES (1, valuelist('Red'));
INSERT INTO nested_table VALUES (2, valuelist('White', 'Brown'));
INSERT INTO nested_table VALUES (3, valuelist('Blue', 'Orange','Yellow'));
4) Select values :
SELECT id, COLUMN_VALUE FROM nested_table t1, TABLE(t1.field1) t2;
5) Result :
ID COLUMN_VALUE
1 Red
2 White
2 Brown
3 Blue
3 Orange
3 Yellow
In select statement you must reference a pseudo-column called "COLUMN_VALUE". To select values from a nested table, always you must explain mother table too.
Stay tuned.
Iscriviti a:
Post (Atom)
Goals 2025
Hi all Today, first day of 2025 my goals for this year : 1. ENGLISH Improve listening comprehension See at least one or two films in Engli...
-
Hi all Today i want speak about education and eLearning websites. Personally I am using COURSERA , in this site you can find many course...
-
Hi all Today i want to speak about oracle nested table. Basically you can define in oracle a field that is a table inserted in other tabl...
-
Today a simple shell script to simulate rolls of two dices : #!/bin/ksh fc=1 while [ fc -eq 1 ]; do clear echo ' How many rolls : \c...