Sponsored Content
Top Forums Shell Programming and Scripting File formatting with newlines Post 302996261 by J1nx007 on Saturday 22nd of April 2017 12:01:11 PM
Old 04-22-2017
Hi RudiC - Thanks for your reply , would this solution be efficient enough to be run daily on files of around 20 MB size. I have an window of 5 mins to complete this formatting .
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with formatting of file.

I have a file with following file format - DMCRH|||83000171|||14022008||0430|||8956612.23|J|||3571235|1378452|23468|6894|9234| DMCRH|||83000215|||15092007||0480|||121.33|J|||LineID003|RefNumSP003|RefNumMem003|0004|0003| What i need done is - 1. Cut the firt four digits of the date (eg 1402... (3 Replies)
Discussion started by: divz
3 Replies

2. Shell Programming and Scripting

Removing inserted newlines from a fileld of fixed width file.

Hi champs! I have a fixed width file in which the records appear like this 11111 <fixed spaces such as 6> description for 11111 <fixed spaces such as 6> some more field to the record of 11111 22222 <fixed spaces such as 6> description for 22222 <fixed spaces such as 6> some more field to the... (8 Replies)
Discussion started by: enigma_1
8 Replies

3. Shell Programming and Scripting

Padding lines in a file with newlines

Hi Guys, I have a file as shown below: 55 6 77 8 88 98 7 85 45 544 1 33 32 13 13 (5 Replies)
Discussion started by: npatwardhan
5 Replies

4. Shell Programming and Scripting

Formatting the file

############################################################################################################# 19/Apr/2010:07:06:19 "Changed directory to dms-imrm/Fort_Wayne/Parkview" - SUCCESSFUL 19/Apr/2010:07:06:19 "Changed directory to Requisitions" - SUCCESSFUL ... (13 Replies)
Discussion started by: Tuxidow
13 Replies

5. UNIX for Dummies Questions & Answers

finding string in very long file without newlines

What's the best way to find a string in a very long file without newlines in Unix? The standard utility I'm aware of for finding a string in a single file is grep, but for a long file without newlines, I think the output is just going to be the input. I suppose I could use sed to replace the... (5 Replies)
Discussion started by: aaronpoley
5 Replies

6. Shell Programming and Scripting

'for LINE in $(cat file)' breaking at spaces, not just newlines

Hello. I'm making a (hopefully) simple shell script xml parser that outputs a file I can grep for information. I am writing it because I have yet to find a command line utility that can do this. If you know of one, please just stop now and tell me about it. Even better would be one I can input... (10 Replies)
Discussion started by: natedawg1013
10 Replies

7. Shell Programming and Scripting

Formatting file data to another file (control character related)

I have to write a program to read data from files and then format into another file. However, I face a strange problem related to control character that I can't understand and solve. The source file is compose of many lines with such format: T_NAME|P_NAME|P_CODE|DOCUMENT_PATH|REG_DATE ... (3 Replies)
Discussion started by: hk6279
3 Replies

8. UNIX for Dummies Questions & Answers

Formatting data in a raw file by using another mapping file

Hi All, i have a requirement where i need to format the input RAW file ( which is CSV) by using another mapping file(also CSV file). basically i am getting feed file with dynamic headers by using mapping file (in that target field is mapped with source filed) i have to convert the raw file into... (6 Replies)
Discussion started by: ravi4informatic
6 Replies

9. UNIX for Beginners Questions & Answers

Remove newlines and carriage return from a csv file using UNIX

I need to remove new lines and carriage returns from csv file. Is there anything other than sed and gwak by which we could achieve this ? Any suggestions ? (3 Replies)
Discussion started by: A_Gaddale
3 Replies

10. Shell Programming and Scripting

UNIX file with Newlines

Hi Friends, I have a data file with new lines. How to remove the newlines and should be showed in one line. I tried using the command tr -d '\n' filename sed 's/\n//g' file name Ex: 1 abc hyd is actual record but in our scenario showing it as 1 abc hydthis record should be like... (5 Replies)
Discussion started by: victory
5 Replies
xcb_query_tree(3)						   XCB Requests 						 xcb_query_tree(3)

NAME
xcb_query_tree - query the window tree SYNOPSIS
#include <xcb/xproto.h> Request function xcb_query_tree_cookie_t xcb_query_tree(xcb_connection_t *conn, xcb_window_t window); Reply datastructure typedef struct xcb_query_tree_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_window_t root; xcb_window_t parent; uint16_t children_len; uint8_t pad1[14]; } xcb_query_tree_reply_t; Reply function xcb_query_tree_reply_t *xcb_query_tree_reply(xcb_connection_t *conn, xcb_query_tree_cookie_t cookie, xcb_generic_error_t **e); Reply accessors xcb_window_t *xcb_query_tree_children(const xcb_query_tree_request_t *reply); int xcb_query_tree_children_length(const xcb_query_tree_reply_t *reply); xcb_generic_iterator_t xcb_query_tree_children_end(const xcb_query_tree_reply_t *reply); REQUEST ARGUMENTS
conn The XCB connection to X11. window The window to query. REPLY FIELDS
response_type The type of this reply, in this case XCB_QUERY_TREE. 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). root The root window of window. parent The parent window of window. children_len The number of child windows. DESCRIPTION
Gets the root window ID, parent window ID and list of children windows for the specified window. The children are listed in bottom-to-top stacking order. RETURN VALUE
Returns an xcb_query_tree_cookie_t. Errors have to be handled when calling the reply function xcb_query_tree_reply. If you want to handle errors in the event loop instead, use xcb_query_tree_unchecked. See xcb-requests(3) for details. ERRORS
This request does never generate any errors. EXAMPLE
/* * Displays the root, parent and children of the specified window. * */ void my_example(xcb_connection *conn, xcb_window_t window) { xcb_query_tree_cookie_t cookie; xcb_query_tree_reply_t *reply; cookie = xcb_query_tree(conn, window); if ((reply = xcb_query_tree_reply(conn, cookie, NULL))) { printf("root = 0x%08x ", reply->root); printf("parent = 0x%08x ", reply->parent); xcb_window_t *children = xcb_query_tree_children(reply); for (int i = 0; i < xcb_query_tree_children_length(reply); i++) printf("child window = 0x%08x ", children[i]); free(reply); } } SEE ALSO
xcb-requests(3), xcb-examples(3), xwininfo(1) AUTHOR
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. XCB
2014-06-10 xcb_query_tree(3)
All times are GMT -4. The time now is 05:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy