Sponsored Content
Top Forums Shell Programming and Scripting Converting tables of row data into columns of tables Post 302126881 by reborg on Friday 13th of July 2007 06:50:39 PM
Old 07-13-2007
Is that the actual format of the data and not a simplified version?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extract data from html tables

hi i need to use unix to extract data from several rows of a table coded in html. I know that rows within a table have the tags <tr> </tr> and so i thought that my first step should be to to delete all of the other html code which is not contained within these tags. i could then use this method... (8 Replies)
Discussion started by: Streetrcr
8 Replies

2. Shell Programming and Scripting

Reading data from multiple tables from Oracle DB

Hi , I want to read the data from 9 tables in oracle DB into 9 different files in the same connection instance (session). I am able to get data from one table to one file with below code : X=`sqlplus -s user/pwd@DB <<eof select col1 from table1; EXIT; eof` echo $X>myfile Can anyone... (2 Replies)
Discussion started by: net
2 Replies

3. UNIX Desktop Questions & Answers

Extracting data from tables and storing in a file

Hi I am trying to write a script to extract information from a database and save that info to a csv file. I am using sql, an oracle database I have no idea how to even begin this. Can somebody please help. (8 Replies)
Discussion started by: ladyAnne
8 Replies

4. Shell Programming and Scripting

Shell script for comparing data of tables

Hi, I have two databases with same tables on different servers.I need to check the data content in each table and if something is missing, should print that. I have a tool which takes the snapshot the table structure,index so on and compares with the other server tables snapshot. Now i need... (1 Reply)
Discussion started by: nessj
1 Replies

5. Shell Programming and Scripting

Help converting row data to columns

I've been trying to figure this out for a while but I'm completely stumped. I have files with data in rows and I need to convert the data to columns. Each record contains four rows with a "field name: value" pair. I would like to convert it to four columns with the field names as column headers... (5 Replies)
Discussion started by: happy_ee
5 Replies

6. Shell Programming and Scripting

Extracting data from tables......

HOw to extracts data from tables in database. Merges them into one output file. This output file is loaded into another tables in database. (1 Reply)
Discussion started by: nari.bommi
1 Replies

7. Shell Programming and Scripting

Getting input data from 2 tables

Hello All, I have one table contains: Table1: 5 10 30 40 60 80 ... Table 2: 10 20 60 80 (7 Replies)
Discussion started by: krsnadasa
7 Replies

8. Shell Programming and Scripting

Append data by looking up 2 tables for multiple files

I want to lookup values from two different tables based on common columns and append. The trick is the column to be looked up is not fixed and varies , so it has to be detected from the header. How can I achieve this at once, for multiple data files, but lookup tables fixed. The two lookup... (5 Replies)
Discussion started by: ritakadm
5 Replies

9. Shell Programming and Scripting

UPDATE COmmand post comparing 2 columns in 2 mysql tables

my queryis : select distinct m.name, item_count, item from master m join client p on m.name=p.name where item_count = 1 and item > 1; But how should I update them? i used update statetment : Update from client Set item =1 where m.name=p.name and item_count=1 AND item>1 Is this wrong? (1 Reply)
Discussion started by: siya@
1 Replies

10. Shell Programming and Scripting

Script writing for tables with binary data

Hi There, I'm trying to write a simple script that will email me when we have an application job in a certain status that needs human intervention. I've used this script for other tables and it works great. However, this one gives me the warning that there is binary data so it might not. ... (2 Replies)
Discussion started by: Colel2
2 Replies
XGetWindowProperty()													      XGetWindowProperty()

Name
  XGetWindowProperty - obtain the atom type and property format for a window.

Synopsis
  int XGetWindowProperty(display, w, property, long_offset, long_length,
       delete, req_type, actual_type_return, actual_format_return, nitems_return, bytes_after_return, prop_return)
	Display *display;
	Window w;
	Atom property;
	long long_offset, long_length;
	Bool delete;
	Atom req_type;
	Atom *actual_type_return;
	int *actual_format_return;
	unsigned long *nitems_return;
	unsigned long *bytes_after_return;
	unsigned char **prop_return;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  w	    Specifies the ID of the window whose atom type and property format you want to obtain.

  property  Specifies the atom of the desired property.

  long_offset
	    Specifies the offset in 32-bit quantities where data will be retrieved.

  long_length
	    Specifies the length in 32-bit multiples of the data to be retrieved.

  delete    Specifies a boolean value of True or False.  If you pass True and a property is returned, the property is deleted from the window
	    after being read and a PropertyNotify event is generated on the window.

  req_type  Specifies an atom describing the desired format of the data.  If AnyPropertyType is specified,  returns  the  property  from  the
	    specified  window  regardless of its type.	If a type is specified, the function returns the property only if its type equals the
	    specified type.

  actual_type_return
	    Returns the actual type of the property.

  actual_format_return
	    Returns the actual data type of the returned data.

  nitems_return
	    Returns the actual number of 8-, 16-, or 32-bit items returned in prop_return.

  bytes_after_return
	    Returns the number of bytes remaining to be read in the property if a partial read was performed.

  prop_return
	    Returns a pointer to the data actually returned, in the specified format.  XGetWindowProperty() always allocates one  extra  byte
	    after the data and sets it to NULL.  This byte is not counted in nitems_return.

Returns
  Success on success.  The failure return value is undefined.

Description
  XGetWindowProperty()	gets the value of a property if it is the desired type.  XGetWindowProperty() sets the return arguments acccording to
  the following rules:

  o  If the specified property does not exist for the specified window, then:  actual_type_return is  None;  actual_format_return  =  0;  and
     bytes_after_return = 0.  delete is ignored in this case, and nitems_return is empty.

  o  If  the  specified  property  exists,  but  its  type  does  not  match req_type, then:  actual_type_return is the actual property type;
     actual_format_return is the actual property format (never zero); and bytes_after_return  is  the  property  length  in  bytes  (even  if
     actual_format_return is 16 or 32).  delete is ignored in this case, and nitems_return is empty.

  o  If  the  specified property exists, and either req_type is AnyPropertyType or the specified type matches the actual property type, then:
     actual_type_return is the actual property type; and actual_format_return is the actual property format (never zero).  bytes_after_return
     and nitems_return are defined by combining the following values:

	   N = actual length of stored property in bytes (even if actual_format_return is 16 or 32)
	   I = 4 * long_offset (convert offset from longs into bytes)
	   L = MINIMUM((N - I), 4 * long_length) (BadValue if L < 0)
	   bytes_after = N - (I + L)  (number of trailing unread bytes in stored property)

     The  returned data (in prop_return) starts at byte index I in the property (indexing from 0).  The actual length of the returned data in
     bytes is L.  L is converted into the number of 8-, 16-, or 32-bit items returned by dividing by 1, 2, or 4 respectively and  this	value
     is returned in nitems_return.  The number of trailing unread bytes is returned in bytes_after_return.

  If delete == True and bytes_after_return == 0 the function deletes the property from the window and generates a PropertyNotify event on the
  window.

  When XGetWindowProperty() executes successfully, it returns Success.	The Success return value and the undocumented value returned on fail-
  ure are the opposite of all other routines that return int or Status.  The value of Success is undocumented, but is zero (0) in the current
  sample implementation from MIT.  The failure value, also undocumented, is currently one (1).	Therefore, comparing either value to True  or
  False, or using the syntax "if (!XGetWindowProperty(...))"  is incorrect.

  To free the resulting data, use XFree().

  For more information, see Volume One, Chapter 12, Interclient Communication.

Errors
  BadAtom

  BadValue  Value of long_offset caused L to be negative above.

  BadWindow

See Also
  XChangeProperty(), XGetAtomName(), XGetFontProperty(), XListProperties(), XRotateWindowProperties(), XSetStandardProperties().

Xlib - Properties													      XGetWindowProperty()
All times are GMT -4. The time now is 04:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy