The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
what are some different commands in c shell and korn shell?? EquinoX UNIX for Dummies Questions & Answers 1 01-29-2008 12:14 AM
how to convert from korn shell to normal shell with this code? forevercalz Shell Programming and Scripting 21 11-23-2005 02:18 AM
KORN Shell - Spawn new shell with commands frustrated1 Shell Programming and Scripting 2 04-20-2005 03:23 PM
Executing Oracle Stored Procs from Korn Shell Vinny_Mitchell UNIX for Dummies Questions & Answers 3 08-06-2003 05:45 AM
Oracle To Korn Shell Array kdst UNIX for Advanced & Expert Users 1 09-24-2002 10:21 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-11-2009
pareshan pareshan is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 24
Korn Shell and Oracle

Hi Guys,

I haven't worked on oracle much but I have a situation where I have to do bdf in all the servers and insert that information into oracle table. I have already created table which have 7 columns, I can insert manually but I dont know how to insert that using Korn shell.

SERVER_ID NOT NULL NUMBER(6)
FS_LOCAL_NAME NOT NULL VARCHAR2(200)
LOCAL_MOUNT NOT NULL CHAR(1)
TOTAL_SPACE NOT NULL NUMBER(10)
USED_SPACE NUMBER(10)
SPACE_AVAILABLE NUMBER(10)
PERCENTAGE_USED NUMBER(3,2)

This is just a example I have done manually and its inserting data
#!/bin/ksh
sqlplus pareshan/ac6e94aac5b1b979902c0b0b1f42621761c@let01a<<EOF
insert into unix_servers values (1,'superior','Y',89885485,858757,4657575,2);
EXIT
EOF

But the thing I need is I have run df command which gives output like this

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol4 1048576 298504 744256 29% /
/dev/vg00/lvol1 1014648 65224 847952 7% /stand
/dev/vg00/lvol8 4194304 1451112 2722456 35% /var
/dev/vg3psw/lvol12 3145728 1221208 1804256 40% /var/mqm
/dev/vg00/lvol10 4194304 3749008 441888 89% /var/adm/sw
/dev/vg00/lvol9 4194304 16744 4144936 0% /var/adm/crash
/dev/vg00/lvol7 5242880 1871528 3345048 36% /usr
/dev/vg3psw/lvol1 4194304 3867784 323984 92% /usr/local
/dev/vg3psw/lvol7 10338304 8815105 1428012 86% /usr/local/vertex
/dev/vg3psw/lvol2 12738560 8080720 4622144 64% /usr/local/oracle
/dev/vg3psw/lvol9 5120000 1286387 3594077 26% /usr/local/g1_3.2_SE
/dev/vghome_old/lvol1


and have to insert those data in the respective column in the oracle table.

Plz Help,
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0