Sponsored Content
Homework and Emergencies Homework & Coursework Questions awk command to retrieve record 23 and 89 from UNIX file Post 303002893 by rakeshp on Monday 4th of September 2017 12:11:33 PM
Old 09-04-2017
Hi

yes I studied and know that how to retrieve only one record with the below command awk 'NR==23' emp.lst but with the same command i need to get one more record that is record number 89. Please let me know how to retrieve that also. I am not looking for all the records from 23 to 89. I am just looking for specific records 23 and 89 only

Regards
Rakesh
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how do we retrieve a line from a file in unix

we need to capture a record from a file in to a variable and do modifications to it .. so capturing line by line in a file in to some variable (2 Replies)
Discussion started by: lmadhuri
2 Replies

2. UNIX for Dummies Questions & Answers

how to read record by record from a file in unix

Hi guys, i have a big file with the following format.This includes header(H),detail(D) and trailer(T) information in the file.My problem is i have to search for the character "6h" at 14 th and 15 th position in all the records .if it is there i have to write all those records into a... (1 Reply)
Discussion started by: raoscb
1 Replies

3. Shell Programming and Scripting

grep command to retrieve one file

The Sed/Grep command is really confusing me. I know I'm missing something that should be really easy to fix. My program displays multiple names after I ask it to display only one, How do I get it to do only one?? it looks like this: Please enter a name to display? >> John (A list then... (9 Replies)
Discussion started by: toejam
9 Replies

4. Shell Programming and Scripting

How to retrieve data using awk command

I have a txt file with below data (textfile1.txt) select col1, col2 from Schema_Name.Table_Name1 select * from Schema_Name.Table_Name2 select col1, col2, col3 from Schema_Name.Table_Name3 select col1 from Schema_Name.Table_Name4 My output should look like Table_Name1 Table_Name2... (5 Replies)
Discussion started by: prasad4004
5 Replies

5. Shell Programming and Scripting

Retrieve the record using 2,2 lines and display the ouput in columnwise

This is my file ------------- Using index 8 for dump of table abd_det. (6101) Dumped 0 records. (13932) Using index 10 for dump of table abscc_det. (6101) Dumped 0 records. (13932) Using index 14 for dump of table absc_det. (6101) Dumped 254365 records. (13932) Using index 16 for dump of... (10 Replies)
Discussion started by: chakkaravarthy
10 Replies

6. Shell Programming and Scripting

[Solved] awk command to read sequentially from a file until last record

Hello, I have a file that looks like this: Generated geometry (...some special descriptor) 1 0.56784 1.45783 -0.87965 8 1.29873 -0.8767 1.098789 ... ... ... ... Generated geometry (....come special descriptor) ... .... ... ... ... ... ... ... and... (4 Replies)
Discussion started by: jaldo0805
4 Replies

7. Shell Programming and Scripting

awk command to omit trailer record in a file

I am trying to omit the trailer record in a variable width file I tried using awk 'NR >1 { print prev } { prev = $0 }' filename The above command is giving output but somehow it is trimming columns from the record. For example if my record has columns A,B,C,D The awk gives output as A,B,C ... (4 Replies)
Discussion started by: abhilashnair
4 Replies

8. Shell Programming and Scripting

Help with Getting distinct record count from a .dat file using UNIX command

Hi, I have a .dat file with contents like the below: Input file ============SEQ NO-1: COLUMN1========== 9835619 7152815 ============SEQ NO-2: COLUMN2 ========== 7615348 7015548 9373086 ============SEQ NO-3: COLUMN3=========== 9373086 Expected Output: (I just... (1 Reply)
Discussion started by: MS06
1 Replies

9. UNIX for Beginners Questions & Answers

awk command to retrieve record 23 and 89 from UNIX file

Hi Everyone, I am looking for awk command to retrieve only the record number 23 and record number 89 from a unix file? Please let me know what is the awk command for this? Regards Rakesh (1 Reply)
Discussion started by: rakeshp
1 Replies

10. UNIX for Beginners Questions & Answers

How to search a text in file and retrieve required lines following it with UNIX command?

I have requirement to search for a text in the file and retrieve required lines that is user defined with unix command. Eg: Find the text UNIX in the below file and need to return Test 8 & Test 9 Test 1 Test 2 Test 3 Test 4 UNIX Test 5 Test 6 Test 7 Test 8 Test 9 Result can... (8 Replies)
Discussion started by: Arunkumarsak4
8 Replies
dns(n)								 Tnm Tcl Extension							    dns(n)

__________________________________________________________________________________________________________________________________________________

NAME
dns - Query the Domain Name System of the Internet. _________________________________________________________________ DESCRIPTION
The dns command allows to query the Internet Domain Name System (DNS) (RFC 1034, RFC 1035, RFC 974, RFC 1912) for host information. The main purpose of this command is to convert host names into IP addresses and vice versa. The dns command also allows to retrieve host infor- mation records as well as mail exchanger records. DNS COMMAND
dns [options] Invoking the dns command with options but without any command arguments allows to retrieve and change the default values. See the description of supported options below. Default values are bound to a Tcl interpreter which allows to have multiple Tcl interpreter with different defaults. dns [options] address host The dns address command sends a query to retrieve the address record for the specified host. The command returns the list of IP addresses for the given host name. dns [options] name address The dns name command sends a query to retrieve the domain name pointer record. A pointer record maps an IP address to a fully quali- fied domain name (FQDN). The command returns the fully qualified domain name for the given IP address. dns [options] hinfo name The dns hinfo command sends a query to retrieve the host information record. The command returns a list containing two elements. The first element describes the hardware type and the second element the operating system. dns [options] mx name The dns mx command sends a query to retrieve the mail exchanger record. The command returns a list of mail exchanger records if name is a domain name for which one or more MX records exist. Each element of this list contains a full qualified domain name (FQDN) and its priority. dns [options] soa name The dns soa command sends a query to retrieve the start of authority record for a DNS domain. The command returns the name of the authoritative DNS server of the DNS domain name. DNS OPTIONS
-server server The -server option defines the DNS server which will be used to process the request. The default value is the default DNS server configured on the local system. -timeout time The -timeout option defines the time the dns command will wait for a response. The time is defined in seconds with a default of 2 seconds. -retries number The -retries option defines how many times a request is retransmitted during the timeout interval. The default number of retries is 2. Please note, that many resolver double the last timeout after every retry. SEE ALSO
scotty(1), Tnm(n), Tcl(n) AUTHORS
Erik Schoenfelder <schoenfr@gaertner.de> Juergen Schoenwaelder <schoenw@cs.utwente.nl> Tnm dns(n)
All times are GMT -4. The time now is 08:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy