Sponsored Content
Full Discussion: awk parsing file
Top Forums Shell Programming and Scripting awk parsing file Post 303011323 by shunya on Tuesday 16th of January 2018 03:51:49 PM
Old 01-16-2018
Hi RUDIC, Thanks for your response but would be better if we can append "Loc (TC) ID" which is "ssfad_fs" in this case. I would prefer to pass it as a variable so that I can use it in the script.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parsing file through awk

hi, how can i achieve this in awk CON Controllers Department R abcuser usernamedesc1 R defuser usernamedesc2 R ... (13 Replies)
Discussion started by: bbeugie
13 Replies

2. Shell Programming and Scripting

AWK and Magic with file parsing

Hi, I have a input file like this TH2TH2867Y NOW33332106Yo You Baby TH2TH3867Y NOW33332106No Way Out TH2TH9867Y NOW33332106Can't find it TJ2TJ2872N WOW33332017sure thing alas TJ2TJ3872N WOW33332017the sky rocks TJ2TJ4872N WOW33332017nothing else matters TJ2TJ5872N WOW33332017you know... (1 Reply)
Discussion started by: devtakh
1 Replies

3. Shell Programming and Scripting

awk and file parsing

Hi, I have a input file like this TH2TH2867Y NOW33332106Yo You Baby TH2TH3867Y NOW33332106No Way Out TH2TH9867Y NOW33332106Can't find it TJ2TJ2872N WOW33332017sure thing alas TJ2TJ3872N WOW33332017the sky rocks TJ2TJ4872N WOW33332017nothing else matters ... (4 Replies)
Discussion started by: devtakh
4 Replies

4. Shell Programming and Scripting

Parsing a file (sed/awk?)

Hello people, newbie question. I'm trying to parse these type of file 1 "CAR " " C1 " " " 6 0 C1 2 "CAR " " O1A" " " 8 0 O1A 3 "CAR " " O1B" " " 8 -1 O1B 4 "CAR " " C2 " " " 6 0 C2 5 "CAR " " C3 " " " 6 ... (10 Replies)
Discussion started by: aristegui
10 Replies

5. Shell Programming and Scripting

awk/sed for parsing file

Hi All, I have a log file like this E Mon Oct 06 00:17:08 2008 xxx2 cm:10614 fm_pi2_svc_iptv_purchase.c:149 1:pin_deferred_act:10601:11:169:1223245028:16 pi2_op_svc_iptv_purchase error <location=PIN_ERRLOC_FM:5 class=PIN_ERRCLASS_SYSTEM_DETERMINATE:1... (10 Replies)
Discussion started by: subin_bala
10 Replies

6. UNIX for Advanced & Expert Users

Parsing through a file with awk/sed

I don't necessary have a problem, as I have a solution. It is just that there may be a better solution. GOAL: Part one: Parse data from a file using the "\" as a delimiter and extracting only the last delimiter. Part two: Parse same file and extract everything but the last delimited item. ... (8 Replies)
Discussion started by: OrangeYaGlad
8 Replies

7. Shell Programming and Scripting

Parsing a file with AWK

Input Group: Erecords: Copy: ADC R2: Replication volumes: Replication set: RSet 1 Replication size: 50.00GB SAN Info: 50.00GB DGC VRAID CX4-960 LUN 1040 (1040) 60,06,01,60,32,bb,21,00,84,a0,08,b1,da,ec,df,11... (2 Replies)
Discussion started by: greycells
2 Replies

8. Shell Programming and Scripting

Help in file parsing with awk

Hi, I have a data set as shown below: 09e757fd,22727,2012-03-01,text1,text2,to 3fd0cae7,310,2012-03-01,text3,text4,to 3fd0cae7,310,2012-03-01,text3,text5,to 3fd0cae7,311,2012-03-01,text7,text10,cc 3fd0cae7,311,2012-03-01,text7,text11,to 3fd0cae7,312,2012-03-01,text8,text15,to... (3 Replies)
Discussion started by: shekhar2010us
3 Replies

9. Shell Programming and Scripting

AWK? parsing /etc/passwd file.

Hello guys, please help me to make simple script for parsing passwd file. I have many passwd files from our servers, named server1.pass, server2.pass etc.. so for server in `ls *.pass` i need to print these rows: server1;root:!:0:0::/root:/usr/bin/ksh... (7 Replies)
Discussion started by: rubico
7 Replies

10. Shell Programming and Scripting

Parsing a file name with awk

I have a command to print out the top 5 most cpu intensive commands: ps aux --sort=-%cpu --no-headers I would like to make a printout containing only the parsed file name. So, I want to turn this: $ ps aux --sort=-%cpu --no-headers user 24883 4.3 1.7 2010436 131440 ? Sl ... (2 Replies)
Discussion started by: bedtime
2 Replies
Tk_CreateBindingTable(3)				       Tk Library Procedures					  Tk_CreateBindingTable(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_CreateBindingTable, Tk_DeleteBindingTable, Tk_CreateBinding, Tk_DeleteBinding, Tk_GetBinding, Tk_GetAllBindings, Tk_DeleteAllBindings, Tk_BindEvent - invoke scripts in response to X events SYNOPSIS
#include <tk.h> Tk_BindingTable Tk_CreateBindingTable(interp) Tk_DeleteBindingTable(bindingTable) unsigned long Tk_CreateBinding(interp, bindingTable, object, eventString, script, append) int Tk_DeleteBinding(interp, bindingTable, object, eventString) const char * Tk_GetBinding(interp, bindingTable, object, eventString) Tk_GetAllBindings(interp, bindingTable, object) Tk_DeleteAllBindings(bindingTable, object) Tk_BindEvent(bindingTable, eventPtr, tkwin, numObjects, objectPtr) ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use when invoking bindings in binding table. Also used for returning results and errors from binding procedures. Tk_BindingTable bindingTable (in) Token for binding table; must have been returned by some previous call to Tk_CreateBind- ingTable. ClientData object (in) Identifies object with which binding is associated. const char *eventString (in) String describing event sequence. char *script (in) Tcl script to invoke when binding triggers. int append (in) Non-zero means append script to existing script for binding, if any; zero means replace existing script with new one. XEvent *eventPtr (in) X event to match against bindings in bindingTable. Tk_Window tkwin (in) Identifier for any window on the display where the event occurred. Used to find display-related information such as key maps. int numObjects (in) Number of object identifiers pointed to by objectPtr. ClientData *objectPtr (in) Points to an array of object identifiers: bindings will be considered for each of these objects in order from first to last. _________________________________________________________________ DESCRIPTION
These procedures provide a general-purpose mechanism for creating and invoking bindings. Bindings are organized in terms of binding tables. A binding table consists of a collection of bindings plus a history of recent events. Within a binding table, bindings are asso- ciated with objects. The meaning of an object is defined by clients of the binding package. For example, Tk keeps uses one binding table to hold all of the bindings created by the bind command. For this table, objects are pointers to strings such as window names, class names, or other binding tags such as all. Tk also keeps a separate binding table for each canvas widget, which manages bindings created by the canvas's bind widget command; within this table, an object is either a pointer to the internal structure for a canvas item or a Tk_Uid identifying a tag. The procedure Tk_CreateBindingTable creates a new binding table and associates interp with it (when bindings in the table are invoked, the scripts will be evaluated in interp). Tk_CreateBindingTable returns a token for the table, which must be used in calls to other procedures such as Tk_CreateBinding or Tk_BindEvent. Tk_DeleteBindingTable frees all of the state associated with a binding table. Once it returns the caller should not use the bindingTable token again. Tk_CreateBinding adds a new binding to an existing table. The object argument identifies the object with which the binding is to be asso- ciated, and it may be any one-word value. Typically it is a pointer to a string or data structure. The eventString argument identifies the event or sequence of events for the binding; see the documentation for the bind command for a description of its format. script is the Tcl script to be evaluated when the binding triggers. append indicates what to do if there already exists a binding for object and eventString: if append is zero then script replaces the old script; if append is non-zero then the new script is appended to the old one. Tk_CreateBinding returns an X event mask for all the events associated with the bindings. This information may be useful to invoke XSe- lectInput to select relevant events, or to disallow the use of certain events in bindings. If an error occurred while creating the binding (e.g., eventString refers to a non-existent event), then 0 is returned and an error message is left in interp->result. Tk_DeleteBinding removes from bindingTable the binding given by object and eventString, if such a binding exists. Tk_DeleteBinding always returns TCL_OK. In some cases it may reset interp->result to the default empty value. Tk_GetBinding returns a pointer to the script associated with eventString and object in bindingTable. If no such binding exists then NULL is returned and an error message is left in interp->result. Tk_GetAllBindings returns in interp->result a list of all the event strings for which there are bindings in bindingTable associated with object. If there are no bindings for object then an empty string is returned in interp->result. Tk_DeleteAllBindings deletes all of the bindings in bindingTable that are associated with object. Tk_BindEvent is called to process an event. It makes a copy of the event in an internal history list associated with the binding table, then it checks for bindings that match the event. Tk_BindEvent processes each of the objects pointed to by objectPtr in turn. For each object, it finds all the bindings that match the current event history, selects the most specific binding using the priority mechanism described in the documentation for bind, and invokes the script for that binding. If there are no matching bindings for a particular object, then the object is skipped. Tk_BindEvent continues through all of the objects, handling exceptions such as errors, break, and con- tinue as described in the documentation for bind. KEYWORDS
binding, event, object, script Tk 4.0 Tk_CreateBindingTable(3)
All times are GMT -4. The time now is 06:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy