Sponsored Content
Top Forums Shell Programming and Scripting Block of records to select from a file Post 302515448 by ahamed101 on Wednesday 20th of April 2011 05:49:58 AM
Old 04-20-2011
Try this

Code:
sed -n '50000,100000 p' file

#sed -n "<startline>,<endline> p" file

regards,
Ahamed
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Select records based on search criteria on first column

Hi All, I need to select only those records having a non zero record in the first column of a comma delimited file. Suppose my input file is having data like: "0","01/08/2005 07:11:15",1,1,"Created",,"01/08/2005" "0","01/08/2005 07:12:40",1,1,"Created",,"01/08/2005"... (2 Replies)
Discussion started by: shashi_kiran_v
2 Replies

2. Shell Programming and Scripting

Select last block from a file

Hi, I have to always select last portion of a block identified by 2 fixed keywords which repeats in a file for eg START .... ... END START .... ... END START .... ... END (9 Replies)
Discussion started by: misenkiser
9 Replies

3. Shell Programming and Scripting

Using a variable to select records with awk

As part of a bigger task, I had to read thru a file and separate records into various batches based on a field. Specifically, separate records based on the value in the batch field as defined below. The batch field left-justified numbers. The datafile is here > cat infile 12345 1 John Smith ... (5 Replies)
Discussion started by: joeyg
5 Replies

4. Shell Programming and Scripting

select records from one file based on a second file

Hi all: I have two files: file1: 74 DS 9871 199009871 1 1990 4 1 165200 Sc pr de te sa ox 1.0 1.0 13.0000 35.7560 5.950 3.0 3.0 13.0100 35.7550 5.970 ** 74 DS 99004 74DS99004 6738 1990 4 1 165200 Eb pr de te sa ox 1.0 1.0 13.0000 ... (7 Replies)
Discussion started by: rleal
7 Replies

5. Shell Programming and Scripting

Automatically select records from several files and then run a C executable file inside the script

Dear list its my first post and i would like to greet everyone What i would like to do is select records 7 and 11 from each files in a folder then run an executable inside the script for the selected parameters. The file format is something like this 7 100 200 7 100 250 7 100 300 ... (1 Reply)
Discussion started by: Gtolis
1 Replies

6. Shell Programming and Scripting

awk print only select records from file2

Print only records from file 2 that do not match file 1 based on criteria of comparing column 1 and column 6 Was trying to play around with following code I found on other threads but not too successful Code: awk 'NR==FNR{p=$1;$1=x;A=$0;next}{$2=$2(A?A:",,,")}1' FS=~ OFS=~ file1 FS="*"... (11 Replies)
Discussion started by: sigh2010
11 Replies

7. UNIX for Dummies Questions & Answers

Turning to SED to select specific records

Hi All, I am looking for a simple concise solution most likely using sed to process the following 4 rows of data from the same record and only keeps it if the second record satisfy certain critea such as surname matches up to smith or jackson: John (firstname) Smith (surname) ... (21 Replies)
Discussion started by: gjackson123
21 Replies

8. Shell Programming and Scripting

To select non-duplicate records using awk

Friends, I have data sorted on id like this id addressl 1 abc 2 abc 2 abc 2 abc 3 aabc 4 abc 4 abc I want to pick all ids with addressesses leaving out duplicate records. Desired output would be id address 1 abc 2 abc 3 abc 4 abc (5 Replies)
Discussion started by: paresh n doshi
5 Replies

9. Shell Programming and Scripting

Select records and fields

Hi All I would like to modify a file like this: >antax gioq21 tris notes abcdefghij klmnopqrs >betax gion32 ter notes2 tuvzabcdef ahgskslsooin this: >tris abcdefghij klmnopqrs >ter tuvzabcdef ahgskslsoo So, I would like to remove the first two fields(and output field 3) in record... (4 Replies)
Discussion started by: giuliangiuseppe
4 Replies

10. Shell Programming and Scripting

Quick way to select many records from a large file

I have a file, named records.txt, containing large number of records, around 0.5 million records in format below: 28433005 1 1 3 2 2 2 2 2 2 2 2 2 2 2 28433004 0 2 3 2 2 2 2 2 2 1 2 2 2 2 ... Another file is a key file, named key.txt, which is the list of some numbers in the first column of... (5 Replies)
Discussion started by: zenongz
5 Replies
trpt(8) 						      System Manager's Manual							   trpt(8)

NAME
trpt - Transliterates protocol trace SYNOPSIS
trpt [-afjst] [-p address] FLAGS
Print the values of the source and destination addresses for each packet recorded, in addition to the normal output. Follows the trace as it occurs, waiting briefly for additional records each time the end of the log is reached. Lists the protocol control block addresses for which trace records exist. Shows only trace records associated with the protocol control block specified in hexadecimal by the address variable. You must include a space between the -p flag and the address variable when you specify this flag. Prints a detailed description of the packet-sequencing information, in addition to the normal output. Prints the values for all timers at each point in the trace, in addition to the normal output. DESCRIPTION
The trpt command, used for debugging sockets, queries the buffer of Transmission Control Protocol (TCP) trace records. The TCP trace record buffer is created when a socket is marked for debugging with the setsockopt(2) subroutine. The trpt command queries the buffer and then prints a description of the trace records. When you specify no options, the trpt command prints all the trace records found in the system and groups them according to their TCP/IP connection Protocol Control Block (PCB). If you are debugging a system file other than the default, the system argument can be used to replace the default. Before you can use the trpt command, you must do the following: Isolate the problem and mark for debugging the socket or sockets involved in the connection. Find the address of the protocol control blocks associated with these sockets by using the netstat -aA command. Then, you can run the trpt command, using the -p flag to supply the associated protocol control block addresses. You can specify multiple -p address flags with a single trpt command. The -f flag can be used to follow the trace log once it is located. The -j flag can be used to check for the presence of trace records for the socket in question. If the system image does not contain the proper symbols to find the trace buffer, the trpt command cannot succeed. FILES
Specifies the command path RELATED INFORMATION
Commands: netstat(1) Functions: setsockopt(2) delim off trpt(8)
All times are GMT -4. The time now is 04:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy