01-14-2013
How to get the file size and count of a table using shell scripting?
Hi there,
im a beginner to the shell scripting.i trying to extract a table from a db(IMD) and i have to get the count of that table and size of the file.
can you help me out how to write the shall scriping for the above query.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have requirement:
1) Check the record count in table (table in oracle)
2) If records exists generate the file for existing records and wait for some time (Go to sleep mode) and
Again check the record count after 10 min.......... (Loop this process if record count >0).
3) Generate touch... (1 Reply)
Discussion started by: kamineni
1 Replies
2. Shell Programming and Scripting
I have requirement:
1) Check the record count in table (table in oracle)
2) If records exists generate the file for existing records and wait for some time then Go to sleep mode and
Again check the record count after 10 min.......... (Loop this process if record count >0).
3) Generate touch... (1 Reply)
Discussion started by: kamineni
1 Replies
3. Shell Programming and Scripting
Hi
Can we create a rectangular table as i have attached in the query .
This is primarily for populating the created table with data gathered .
Hope I made myself clear ...
Pls suggest
Thanks (1 Reply)
Discussion started by: ultimatix
1 Replies
4. Shell Programming and Scripting
My Code is
get_week_date()
{
`sqlplus -s ${DQM_SQL_LOGON}@${DQM_SID} << EOF
SET ECHO OFF
SET FEEDBACK OFF
SET PAGES 0
SET SERVEROUTPUT ON
SET VERIFY OFF
SET TRIMSPOOL ON
(update file_level_qc fq set FQ.DATA_FILE_NAME='Hyvee_Pharmacy_Solutions_201304_v1.txt'... (2 Replies)
Discussion started by: karthick.cho
2 Replies
5. UNIX for Dummies Questions & Answers
I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms.
Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies
6. Shell Programming and Scripting
I have written a shell script that calls below sql file. It is not sending the query data in table in the body of email.
spool table_update.html;
SELECT * FROM PROCESS_LOG_STATS where process = 'ActivateSubscription';
spool off;
exit;
Please use code tags next time for your code and data.... (9 Replies)
Discussion started by: Sharanakumar
9 Replies
7. Shell Programming and Scripting
Below is my code where i tried using table tag to print out put in table but its not working
#!/bin/ksh
#] && . ./.profile 2>/dev/null
if test -f '.profile'; then . ./.profile; fi;
#. .profile
LOG_DIR=/app/rpx/jobs/scripts/just/logs
sendEmail()
{
pzCType="$1";... (5 Replies)
Discussion started by: ankit.mca.aaidu
5 Replies
8. UNIX for Advanced & Expert Users
LOG_DIR=/app/rpx/jobs/scripts/just/logs
sendEmail()
{
pzCType="$1"; pzTitle="$2"; pzMsg="$3"; pzFrom="$4"; pzTo="$5"; pzFiles="$6"; pzReplyTo="$7"
(
echo "From: $pzFrom\nTo: $pzTo\nSubject: $pzTitle${pzReplyTo:+\nReply-To: $pzReplyTo}"
] && echo... (1 Reply)
Discussion started by: ankit.mca.aaidu
1 Replies
9. Forum Support Area for Unregistered Users & Account Problems
Hi,
I am trying to create a table through shell scripting . I used a command sqlplus -s to connect to sqlplus and user as sysdba. but there is a problem in it. can anyone please solve this .
#!/bin/bash
$(`sqlplus -s / as sysdba <<eof
create table sample (id,int);
insert into sample... (1 Reply)
Discussion started by: Unregistered
1 Replies
10. Shell Programming and Scripting
Hi,
I would like to know how to define the size of the array in c shell scripting. (15 Replies)
Discussion started by: gopishrine
15 Replies
LEARN ABOUT DEBIAN
sdrtable
ici::doc::pod3::sdrtable(3) ICI library functions ici::doc::pod3::sdrtable(3)
NAME
sdrtable - Simple Data Recorder table management functions
SYNOPSIS
#include "sdr.h"
Object sdr_table_create (Sdr sdr, int rowSize, int rowCount);
int sdr_table_user_data_set (Sdr sdr, Object table, Address userData);
Address sdr_table_user_data (Sdr sdr, Object table);
int sdr_table_dimensions (Sdr sdr, Object table, int *rowSize,
int *rowCount);
int sdr_table_stage (Sdr sdr, Object table);
Address sdr_table_row (Sdr sdr, Object table,
unsigned int rowNbr);
int sdr_table_destroy (Sdr sdr, Object table);
DESCRIPTION
The SDR table functions manage table objects in the SDR. An SDR table comprises N rows of M bytes each, plus optionally one word of user
data (which is nominally the address of some other object in the SDR's heap space). When a table is created, the number of rows in the
table and the length of each row are specified; they remain fixed for the life of the table. The table functions merely maintain
information about the table structure and its location in the SDR and calculate row addresses; other SDR functions such as sdr_read() and
sdr_write() are used to read and write the contents of the table's rows. In particular, the format of the rows of a table is left entirely
up to the user.
Object sdr_table_create(Sdr sdr, int rowSize, int rowCount)
Creates a "self-delimited table", comprising rowCount rows of rowSize bytes each, in the heap space of the indicated SDR. Note that
the content of the table, a two-dimensional array, is a single SDR heap space object of size (rowCount x rowSize). Returns the address
of the new table on success, zero on any error.
void sdr_table_user_data_set(Sdr sdr, Object table, Address userData)
Sets the "user data" word of table to userData. Note that userData is nominally an Address but can in fact be any value that occupies
a single word. It is typically used to point to an SDR object that somehow characterizes the table as a whole, such as an SDR string
containing a name.
Address sdr_table_user_data(Sdr sdr, Object table)
Returns the value of the "user data" word of table, or zero on any error.
void sdr_table_dimensions(Sdr sdr, Object table, int *rowSize, int *rowCount)
Reports on the row size and row count of the indicated table, as specified when the table was created.
void sdr_table_stage(Sdr sdr, Object table)
Stages table so that the array it encapsulates may be updated; see the discussion of sdr_stage() in sdr(3). The effect of this
function is the same as:
sdr_stage(sdr, NULL, (Object) sdr_table_row(sdr, table, 0), 0)
Address sdr_table_row(Sdr sdr, Object table, unsigned int rowNbr)
Returns the address of the rowNbrth row of table, for use in reading or writing the content of this row; returns -1 on any error.
void sdr_table_destroy(Sdr sdr, Object table)
Destroys table, releasing all bytes of all rows and destroying the table structure itself. DO NOT use sdr_free() to destroy a table,
as this would leave the table's content allocated yet unreferenced.
SEE ALSO
sdr(3), sdrlist(3), sdrstring(3)
perl v5.14.2 2012-05-25 ici::doc::pod3::sdrtable(3)