Sponsored Content
Top Forums Shell Programming and Scripting Read logline line by line with awk/sed Post 302198898 by danmero on Sunday 25th of May 2008 01:46:36 AM
Old 05-25-2008
Deleted by owner

Last edited by danmero; 05-26-2008 at 09:45 PM.. Reason: Out of scope.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using Sed to read one line only

I have a bash script which produces the desired output (mostly). tempTxt=`sed -n '79,/^$/p' <sourceFile.txt | cut -c 13-19` What this produces is the text from the 79th line of the source file and cuts the text to the 13th through the 19th chars. Then the script does the same thing... (4 Replies)
Discussion started by: roninuta
4 Replies

2. Shell Programming and Scripting

awk;sed appending line to previous line....

I know this has been asked before but I just can't parse the syntax as explained. I have a set of files that has user information spread out over two lines that I wish to merge into one: User1NameLast User1NameFirst User1Address E-Mail:User1email User2NameLast User2NameFirst User2Address... (11 Replies)
Discussion started by: walkerwheeler
11 Replies

3. Shell Programming and Scripting

bash: read file line by line (lines have '\0') - not full line has read???

I am using the while-loop to read a file. The file has lines with null-terminated strings (words, actually.) What I have by that reading - just a first word up to '\0'! I need to have whole string up to 'new line' - (LF, 10#10, 16#A) What I am doing wrong? #make file 'grb' with... (6 Replies)
Discussion started by: alex_5161
6 Replies

4. Shell Programming and Scripting

sed to read line by line and input into another file

I have two files. Fileone contains text string one text string two text string three Filetwo contains Name: Address: Summary: Name: Address: Summary: Name: Address: Summary: I would like to use sed to read each line of file one and put it at the end of the summary line of file... (3 Replies)
Discussion started by: dolacap
3 Replies

5. Shell Programming and Scripting

how to read the contents of two files line by line and compare the line by line?

Hi All, I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies

6. Shell Programming and Scripting

sed command to replace a line at a specific line number with some other line

my requirement is, consider a file output cat output blah sdjfhjkd jsdfhjksdh sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf hellow there this doesnt look good et cetc etc etcetera i want to replace a line of line number 4 ("this doesnt look good") with some other line ... (3 Replies)
Discussion started by: vivek d r
3 Replies

7. Shell Programming and Scripting

How to read a two files, line by line in UNIX script and how to assign shell variable to awk ..?

Input are file and file1 file contains store.bal product.bal category.bal admin.bal file1 contains flip.store.bal ::FFFF:BADC:CD28,::FFFF:558E:11C5,6,8,2,1,::FFFF:81C8:CA8B,::FFFF:BADC:CD28,1,0,0,0,::FFFF:81C8:11C5,2,1,0,0,::FFFF:81DC:3111,1,0,1,0 store.bal.... (2 Replies)
Discussion started by: veeruasu
2 Replies

8. Shell Programming and Scripting

Multiple line search, replace second line, using awk or sed

All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed... I have an input file similar to: &LOG &LOG Part: "@DB/TC10000021855/--F" &LOG &LOG &LOG Part: "@DB/TC10000021852/--F" &LOG Cloning_Action: RETAIN &LOG Part: "@DB/TCCP000010713/--A" &LOG &LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies

9. Shell Programming and Scripting

Need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line...

Hello, I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be: SRVXPAPI001 ERRO JUN24 07:28:34 1775 REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F ... (8 Replies)
Discussion started by: Ferocci
8 Replies

10. Shell Programming and Scripting

How to read file line by line and compare subset of 1st line with 2nd?

Hi all, I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like: <date1>|<data1>|<url1>|<result1> <date2>|<data2>|<url2>|<result2> <date3>|<data3>|<url3>|<result3> <date4>|<data4>|<url4>|<result4> What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies
XSetSelectionOwner(3X11)												  XSetSelectionOwner(3X11)

NAME
XSetSelectionOwner, XGetSelectionOwner, XConvertSelection - manipulate window selection SYNOPSIS
XSetSelectionOwner(display, selection, owner, time) Display *display; Atom selection; Window owner; Time time; Window XGetSelectionOwner(display, selection) Display *display; Atom selection; XConvertSelection(display, selection, target, property, requestor, time) Display *display; Atom selection, target; Atom property; Window requestor; Time time; ARGUMENTS
Specifies the connection to the X server. Specifies the owner of the specified selection atom. You can pass a window or None. Specifies the property name. You also can pass None. Specifies the requestor. Specifies the selection atom. Specifies the target atom. Specifies the time. You can pass either a timestamp or CurrentTime. DESCRIPTION
The XSetSelectionOwner function changes the owner and last-change time for the specified selection and has no effect if the specified time is earlier than the current last-change time of the specified selection or is later than the current X server time. Otherwise, the last- change time is set to the specified time, with CurrentTime replaced by the current server time. If the owner window is specified as None, then the owner of the selection becomes None (that is, no owner). Otherwise, the owner of the selection becomes the client executing the request. If the new owner (whether a client or None) is not the same as the current owner of the selection and the current owner is not None, the current owner is sent a SelectionClear event. If the client that is the owner of a selection is later terminated (that is, its connection is closed) or if the owner window it has specified in the request is later destroyed, the owner of the selection automatically reverts to None, but the last-change time is not affected. The selection atom is uninterpreted by the X server. XGetSelectionOwner returns the owner window, which is reported in SelectionRequest and SelectionClear events. Selections are global to the X server. XSetSelectionOwner can generate BadAtom and BadWindow errors. The XGetSelectionOwner function returns the window ID associated with the window that currently owns the specified selection. If no selec- tion was specified, the function returns the constant None. If None is returned, there is no owner for the selection. XGetSelectionOwner can generate a BadAtom error. XConvertSelection requests that the specified selection be converted to the specified target type: If the specified selection has an owner, the X server sends a SelectionRequest event to that owner. If no owner for the specified selection exists, the X server generates a Selec- tionNotify event to the requestor with property None. The arguments are passed on unchanged in either of the events. There are two predefined selection atoms: PRIMARY and SECONDARY. XConvertSelection can generate BadAtom and BadWindow errors. DIAGNOSTICS
A value for an Atom argument does not name a defined Atom. A value for a Window argument does not name a defined Window. SEE ALSO
Xlib -- C Language X Interface XSetSelectionOwner(3X11)
All times are GMT -4. The time now is 08:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy