Sponsored Content
Full Discussion: file question
Top Forums Shell Programming and Scripting file question Post 26194 by google on Tuesday 13th of August 2002 09:28:30 AM
Old 08-13-2002
I was more curious than anything as to whether there is a way to insert a line of data into a file (at any given line number) without using an editor such as sed.

What I really would like to know is if I can accomplish this without using intermediate files such as noted by the first reply.

How can I do this with sed?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Newbie question about difference between executable file and ordinary file

Hi, I am newbie in unix and just started learning it. I want to know what is the difference between an executable file and a file (say text file). How to create executable file? What is the extension for that? How to differentiate ? How does it get executed? Thanks (1 Reply)
Discussion started by: Balaji
1 Replies

2. UNIX for Dummies Questions & Answers

file deleting question

somehow one of my directories got a number of files whose names start with a dash - e.g. -1129.txt how can I remove them? If I issue rm -1129.txt I get the message of illegal options if I issue rm /-1129.txt I get a message that -1129.txt is not found Lisa HP-UX 11.23 i64 (3 Replies)
Discussion started by: LisaS
3 Replies

3. Shell Programming and Scripting

Post Shell programming: Question about source a file and read data from the file

This is shell programming assignment. It needs to create a file called .std_dbrc contains STD_DBROOT=${HOME}/class/2031/Assgn3/STD_DB (which includes all my simple database files) and I am gonna use this .std_dbrc in my script file (read the data from the database files) like this: .... (3 Replies)
Discussion started by: ccwq
3 Replies

4. Shell Programming and Scripting

mk file question

In a makefile when you specify something like.... xxx-xx: -$(yyy) $(zzz) What does the"-" (hyphen) before the "$" mean? (assuming xxx-xx is the target name) (2 Replies)
Discussion started by: felixmat1
2 Replies

5. Shell Programming and Scripting

Question about output to file

Hi, I am try to setup a FOR loop script to find out all the existing linux workstations in the network w/ ip address, hostname and linux version. I created a basic FOR loop script: for i in $(seq 1 254) do echo 10.72.169.$i >> result ssh -o ConnectTimeout=3 root@10.72.169.$i "hostname"... (1 Reply)
Discussion started by: beeloo
1 Replies

6. UNIX for Dummies Questions & Answers

Question regarding lm file

How to know where a ln file point to.ln files is soft link which point to some file. I want to get the absolute path of that file which my lm files pointing to. (5 Replies)
Discussion started by: mr_deb
5 Replies

7. UNIX for Dummies Questions & Answers

tar file question

Hi I did this command to tar the files but I got an error. tar -cvpf filename.tar pathname/ It did tar the file filename.tar but then it gave me this error "Reach end of file before expected". The new tar file is about 2GB. So does that mean my tar file limit is 2GB? Is there a max limit... (4 Replies)
Discussion started by: chaoses
4 Replies

8. Red Hat

Question about crontab file!

Friends , I have the following questions about crontab file : 1) In crontab file I got the folllowing output : # cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root... (2 Replies)
Discussion started by: shipon_97
2 Replies

9. Solaris

File system - question?

Hello, I have few questions about file system in Unix and Linux. 1. What's the difference between Unix and Linux in their file system? Are they the same? 2. Is in Unix directory for administrator "/root" - like in Linux - Ubuntu or not? 3.Where is the users directory in Unix? Is it... (2 Replies)
Discussion started by: niki22
2 Replies

10. Shell Programming and Scripting

how many pass in the file ,three question

Hi all Question 1: I want to use "awk" or "sed" to know how many "PASS after "FINISH" i Question 2: I want to use "awk" or "sed" to know how many "PASS" after the *last* "FINISH ,it shoud be 2 in this file Question 3. I want to use "awk" or "sed" to know how many "PASS between "789" and... (5 Replies)
Discussion started by: yanglei_fage
5 Replies
Net::DNS::Question(3)					User Contributed Perl Documentation				     Net::DNS::Question(3)

NAME
Net::DNS::Question - DNS question record SYNOPSIS
use Net::DNS::Question; $question = new Net::DNS::Question('example.com', 'A', 'IN'); DESCRIPTION
A Net::DNS::Question object represents a record in the question section of a DNS packet. METHODS
new $question = new Net::DNS::Question('example.com', 'A', 'IN'); $question = new Net::DNS::Question('example.com'); $question = new Net::DNS::Question('192.0.32.10', 'PTR', 'IN'); $question = new Net::DNS::Question('192.0.32.10'); Creates a question object from the domain, type, and class passed as arguments. One or both type and class arguments may be omitted and will assume the default values shown above. RFC4291 and RFC4632 IP address/prefix notation is supported for queries in both in-addr.arpa and ip6.arpa namespaces. decode $question = decode Net::DNS::Question($data, $offset); ($question, $offset) = decode Net::DNS::Question($data, $offset); Decodes the question record at the specified location within a DNS wire-format packet. The first argument is a reference to the buffer containing the packet data. The second argument is the offset of the start of the question record. Returns a Net::DNS::Question object and the offset of the next location in the packet. An exception is raised if the object cannot be created (e.g., corrupt or insufficient data). encode $data = $question->encode( $offset, $hash ); Returns the Net::DNS::Question in binary format suitable for inclusion in a DNS packet buffer. The optional arguments are the offset within the packet data where the Net::DNS::Question is to be stored and a reference to a hash table used to index compressed names within the packet. name $name = $question->name; Internationalised domain name corresponding to the qname attribute. Decoding non-ASCII domain names is computationally expensive and undesirable for names which are likely to be used to construct further queries. When required to communicate with humans, the 'proper' domain name should be extracted from a query or reply packet. $query = new Net::DNS::Packet( $example, 'ANY' ); $reply = $resolver->send($query) or die; ($question) = $reply->question; $name = $question->name; qname, zname $qname = $question->qname; $zname = $question->zname; Canonical ASCII domain name as required for the query subject transmitted to a nameserver. In dynamic update packets, this attribute is known as zname() and refers to the zone name. qtype, ztype $qtype = $question->qtype; $ztype = $question->ztype; Returns the question type attribute. In dynamic update packets, this attribute is known as ztype() and refers to the zone type. qclass, zclass $qclass = $question->qclass; $zclass = $question->zclass; Returns the question class attribute. In dynamic update packets, this attribute is known as zclass() and refers to the zone class. print $object->print; Prints the record to the standard output. Calls the string() method to get the string representation. string print "string = ", $question->string, " "; Returns a string representation of the question record. COPYRIGHT
Copyright (c)1997-2002 Michael Fuhr. Portions Copyright (c)2002-2004 Chris Reinhardt. Portions Copyright (c)2003,2006-2011 Dick Franks. All rights reserved. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
perl, Net::DNS, Net::DNS::DomainName, Net::DNS::Packet, RFC 1035 Section 4.1.2 perl v5.18.2 2014-01-16 Net::DNS::Question(3)
All times are GMT -4. The time now is 09:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy