Sponsored Content
Top Forums Shell Programming and Scripting how to read multi line characters in a single column Post 302600986 by satyaatcgi on Wednesday 22nd of February 2012 03:20:10 PM
Old 02-22-2012
Bug

Thanks Ranga for your reply. Now its formatting is working correctly. Could you please explain a little bit for each steps how its doing??
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use Perl to merge multi-line into single line

Hi, Can anyone know how to use perl to merge the following multi-line information which beginning with "BAM" into one line. For each line need to delete the return and add a space. Please see the red color line. ******Org. Multi-line) BAM admin 101.203.57.22 ... (3 Replies)
Discussion started by: happyday
3 Replies

2. Shell Programming and Scripting

How to use Perl to join multi-line into single line

Hello, Did anyone know how to write a perl script to merge the multi-line into a single line where each line with start at timestamp Input--> timestamp=2009-11-10-04.55.20.829347; a; b; c; timestamp=2009-11-10-04.55.20.829347; aa; bb; cc; (5 Replies)
Discussion started by: happyday
5 Replies

3. Shell Programming and Scripting

Read duplicate column, then generate a single line

Dear experts, How to generate the result listed below ? Input file: col1col2col3Aname1size1Aname2size2Aname3size1Bname4size3Bname5size5Cname6size8Cname7size6Cname8size9Cname9size11Cname10size16 What I want is: Aname1, size1name2, size2name3, size1Bname4,size3name5, size5Cname6,... (1 Reply)
Discussion started by: tojzz
1 Replies

4. Shell Programming and Scripting

Merge multi-line output into a single line

Hello I did do a search and the past threads doesn't really solve my issue. (using various awk commands) I need to combine the output from java -version into 1 line, but I am having difficulties. When you exec java -version, you get: java version "1.5.0_06" Java(TM) 2 Runtime... (5 Replies)
Discussion started by: flagman5
5 Replies

5. Shell Programming and Scripting

Multi lines to single line

HI, My input file contains the data as like below: A1234119993 B6271113 Bghjkjk A1234119992 B6271113hi Bghjkjkmkl the output i require is : A1234119993 B6271113 Bghjkjk A1234119992 B6271113hi Bghjkjkmkl Please help me in this. Thanks (6 Replies)
Discussion started by: pandeesh
6 Replies

6. Shell Programming and Scripting

Joining multi-line output to a single line in a group

Hi, My Oracle query is returing below o/p ---------------------------------------------------------- Ins trnas value a lkp1 x a lkp1 y b lkp1 a b lkp2 x b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies

7. UNIX for Dummies Questions & Answers

Characters in a single read

Hi, I have the file which has the data : accctaaccctaaccctaaccctaaccctaaccctaaccctaaccctaac cctaacccaaccctaaccctaaccctaaccctaaccctaaccctaacccc taaccctaaccctaaccctaaccctaacctaaccctaaccctaaccctaa ccctaaccctaaccctaaccctaaccctaacccctaaccctaaccctaaa... (24 Replies)
Discussion started by: rajivn786
24 Replies

8. UNIX for Dummies Questions & Answers

Remove multi line and single line comments

Hi, I am trying to remove multi line and single line comments like examples below I have tried this pattern. it works fine for single line comments and multi line comments in a single line only. but this fails when the comments are extended in multiple lines as shown in the comment 2 of... (3 Replies)
Discussion started by: ahmedwaseem2000
3 Replies

9. Shell Programming and Scripting

Help with reformat single-line multi-fasta into multi-line multi-fasta

Input File: >Seq1 ASDADAFASFASFADGSDGFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSD >Seq2 SDASDAQEQWEQeqAdfaasd >Seq3 ASDSALGHIUDFJANCAGPATHLACJHPAUTYNJKG ...... Desired Output File >Seq1 ASDADAFASF ASFADGSDGF SDFSDFSDFS DFSDFSDFSD FSDFSDFSDF SD >Seq2 (4 Replies)
Discussion started by: patrick87
4 Replies

10. Shell Programming and Scripting

Multi line log files to single line format

I want to read the log file which was generate from other command . And the output was having multi line in log files for job name and server name. But i need to make all the logs on one line Source file 07/15/2018 17:02:00 TRANSLOG_1700 Server0005_SQL ... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
xcb_get_property(3)						   XCB Requests 					       xcb_get_property(3)

NAME
xcb_get_property - Gets a window property SYNOPSIS
#include <xcb/xproto.h> Request function xcb_get_property_cookie_t xcb_get_property(xcb_connection_t *conn, uint8_t _delete, xcb_window_t window, xcb_atom_t property, xcb_atom_t type, uint32_t long_offset, uint32_t long_length); Reply datastructure typedef struct xcb_get_property_reply_t { uint8_t response_type; uint8_t format; uint16_t sequence; uint32_t length; xcb_atom_t type; uint32_t bytes_after; uint32_t value_len; uint8_t pad0[12]; } xcb_get_property_reply_t; Reply function xcb_get_property_reply_t *xcb_get_property_reply(xcb_connection_t *conn, xcb_get_property_cookie_t cookie, xcb_generic_error_t **e); Reply accessors void *xcb_get_property_value(const xcb_get_property_request_t *reply); int xcb_get_property_value_length(const xcb_get_property_reply_t *reply); xcb_generic_iterator_t xcb_get_property_value_end(const xcb_get_property_reply_t *reply); REQUEST ARGUMENTS
conn The XCB connection to X11. _delete Whether the property should actually be deleted. For deleting a property, the specified type has to match the actual property type. window The window whose property you want to get. property The property you want to get (an atom). type The type of the property you want to get (an atom). long_offset Specifies the offset (in 32-bit multiples) in the specified property where the data is to be retrieved. long_length Specifies how many 32-bit multiples of data should be retrieved (e.g. if you set long_length to 4, you will receive 16 bytes of data). REPLY FIELDS
response_type The type of this reply, in this case XCB_GET_PROPERTY. This field is also present in the xcb_generic_reply_t and can be used to tell replies apart from each other. sequence The sequence number of the last request processed by the X11 server. length The length of the reply, in words (a word is 4 bytes). format Specifies whether the data should be viewed as a list of 8-bit, 16-bit, or 32-bit quantities. Possible values are 8, 16, and 32. This information allows the X server to correctly perform byte-swap operations as necessary. type The actual type of the property (an atom). bytes_after The number of bytes remaining to be read in the property if a partial read was performed. value_len The length of value. You should use the corresponding accessor instead of this field. DESCRIPTION
Gets the specified property from the specified window. Properties are for example the window title (WM_NAME) or its minimum size (WM_NOR- MAL_HINTS). Protocols such as EWMH also use properties - for example EWMH defines the window title, encoded as UTF-8 string, in the _NET_WM_NAME property. TODO: talk about type TODO: talk about delete TODO: talk about the offset/length thing. what's a valid use case? RETURN VALUE
Returns an xcb_get_property_cookie_t. Errors have to be handled when calling the reply function xcb_get_property_reply. If you want to handle errors in the event loop instead, use xcb_get_property_unchecked. See xcb-requests(3) for details. ERRORS
xcb_window_error_t The specified window does not exist. xcb_value_error_t The specified long_offset is beyond the actual property length (e.g. the property has a length of 3 bytes and you are setting long_offset to 1, resulting in a byte offset of 4). xcb_atom_error_t property or type do not refer to a valid atom. EXAMPLE
/* * Prints the WM_NAME property of the window. * */ void my_example(xcb_connection *c, xcb_window_t window) { xcb_get_property_cookie_t cookie; xcb_get_property_reply_t *reply; /* These atoms are predefined in the X11 protocol. */ xcb_atom_t property = XCB_ATOM_WM_NAME; xcb_atom_t type = XCB_ATOM_STRING; // TODO: a reasonable long_length for WM_NAME? cookie = xcb_get_property(c, 0, window, property, type, 0, 0); if ((reply = xcb_get_property_reply(c, cookie, NULL))) { int len = xcb_get_property_value_length(reply); if (len == 0) { printf("TODO "); free(reply); return; } printf("WM_NAME is %.*s ", len, (char*)xcb_get_property_value(reply)); } free(reply); } SEE ALSO
xcb-requests(3), xcb-examples(3), xcb_intern_atom(3), xprop(1) AUTHOR
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. XCB
2014-06-10 xcb_get_property(3)
All times are GMT -4. The time now is 03:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy