Sponsored Content
Full Discussion: Gawk help (windows)
Top Forums Shell Programming and Scripting Gawk help (windows) Post 302498596 by harris_t on Tuesday 22nd of February 2011 02:25:53 AM
Old 02-22-2011
I appreciate the response.

The command I used was:
Code:
 gawk -F":" "/NTP/{print $2}" time.txt

I can't get your code to work, it is probably because I'm using "gawk for windows".. http://gnuwin32.sourceforge.net/packages/gawk.htm

When I use your code I get this response:
Image

Last edited by harris_t; 02-22-2011 at 03:32 AM..
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

gawk HELP

I have to compare records in two files. It can be done using gawk/awk but i am unable to do it. Please help me File1 ABAAAAAB BC asa sa ABAAABAA BC bsa sm ABBBBAAA BC bxz sa ABAAABAB BC csa sa ABAAAAAA BC dsa sm ABBBBAAB BC dxz sa File 2 ABAAAAAB BC aas ba ABAAAAAB BC asa sa... (6 Replies)
Discussion started by: sandeep_hi
6 Replies

2. Shell Programming and Scripting

How can I make running gawk scripts more user-friendly in a Windows environment?

I know, and I apologise for using the W word, but I have users asking if they can use my gawk scripts, but I just know they're not going to like using the DOS command line. Is there any way for me to run my gawk scripts from a gui? Even if it's from a web page (html, php, what ever). I do not... (3 Replies)
Discussion started by: jonathanm
3 Replies

3. Shell Programming and Scripting

Gawk Help

Hi, I am using the script to print the portion of the file containing a particular string. But it is giving error "For Reading (No such file or directory). I am using cygwin as unix simulator. cat TT35*.log | gawk -v search="12345678" ' /mSOriginating /,/disconnectingParty/ { ... (1 Reply)
Discussion started by: vanand420
1 Replies

4. Windows & DOS: Issues & Discussions

Gawk Script in Windows batch file - Help

Good morning all. I have been running into a problem running a simple gawk script that selects every third line from an input file and writes it to an output file. gawk "NR%3==0" FileIn > FileOut I am attempting to run this command from a batch file at the command line. I have several hundred... (6 Replies)
Discussion started by: 10000springs
6 Replies

5. Windows & DOS: Issues & Discussions

Gawk on Windows: Joining lines only if 1st field matches

Hi.. i have two files:: file_1:: mOnkey huMAnfile_2:: Human:hates:banana i:like:*** Monkey:loves:banana dogs:kill:catsdesired output:: Monkey:loves:banana Human:hates:bananaso only when the 1st field matches from both files print it from file_2 ((case-sensitive)) i also would like... (21 Replies)
Discussion started by: M@LIK
21 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 08:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy