The first argument (sathya in this case) is the "string" which should be present in the line to attempt substitution.
The second argument (123 here) is the "string" you want to search for.
The third argument (S@THYA01 here) is the replacement "string".
The fourth argument (infile here) is the file to be changed.
Backup of the original file will be taken with .bak extension.
Last edited by elixir_sinari; 10-15-2012 at 05:24 AM..
This User Gave Thanks to elixir_sinari For This Post:
I have a config file with the pattern given below.
/usr/games cocoa fudge # export to only these machines
/usr -access=clients # export to my clients
/usr/local # export to the world
/usr2 -access=bison:deer:pup ... (0 Replies)
Hi All,
Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern.
#!bin/sh
# The pattern that user want to add to the files
echo "Enter the pattern of the redirect"
read value
# check if the user has... (1 Reply)
Hi, I have 2 files that I have modified to basically match each other, however I want to determine what (if any) line in file 1 does not exist in file 2. I need to match column $1 and $2 as a single string in file1 to $1 and $2 in file2 as these two columns create a match.
I'm stuck in an AWK... (9 Replies)
Hi,
I got a file which looks like this:
Value A
Status: -
Other: -
Value B
Status: -
Other: -
Value C
Status: -
Other: -
I would like to change only the first line which includes the "Status:" string after matching the line containing "Value B", so the output file should look... (5 Replies)
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
i have little challenge, help me out.i have a file where i have a value declared and and i have to replace the value when called. for example i have the value for abc and ccc. now i have to substitute the value of
value abc and ccc in the place of them.
Input File:
go to &abc=ddd;
if... (16 Replies)
HI,
I have File1 which contains :-
admins = anand,satheesha,user1,user2,user3,user4,user5,user10,vishal
nonadmins = read-only
@admins = rw
@nonadmins = r
One shell script, using that I want to change the File1 as per user input (let's say $1) which have value as 'John', so now I want to... (6 Replies)
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
LEARN ABOUT DEBIAN
ldns_tcp_connect
ldns(3) Library Functions Manual ldns(3)NAME
ldns_tcp_send_query, ldns_tcp_read_wire, ldns_tcp_connect-
SYNOPSIS
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
ssize_t ldns_tcp_send_query(ldns_buffer *qbin, int sockfd, const struct sockaddr_storage *to, socklen_t tolen);
uint8_t* ldns_tcp_read_wire(int sockfd, size_t *size);
int ldns_tcp_connect(const struct sockaddr_storage *to, socklen_t tolen, struct timeval timeout);
DESCRIPTION
ldns_tcp_send_query() send a query via tcp to a server. Don't want for the answer
qbin: the buffer to send
sockfd: the socket to use
to: which ip to send it
tolen: socketlen
Returns number of bytes sent
ldns_tcp_read_wire() This routine may block. Use ldns_tcp_read_wire_timeout, it checks timeouts. Gives back a raw packet from the wire and
reads the header data from the given socket. Allocates the data (of size size) itself, so don't forget to free
sockfd: the socket to read from
size: the number of bytes that are read
Returns the data read
ldns_tcp_connect() Create a tcp socket to the specified address
to: ip and family
tolen: length of to
timeout: timeout for the connect attempt
Returns a socket descriptor
AUTHOR
The ldns team at NLnet Labs. Which consists out of Jelte Jansen and Miek Gieben.
REPORTING BUGS
Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at http://www.nlnetlabs.nl/bugs/index.html
COPYRIGHT
Copyright (c) 2004 - 2006 NLnet Labs.
Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
ldns_send, ldns_pkt, ldns_resolver. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
REMARKS
This manpage was automaticly generated from the ldns source code by use of Doxygen and some perl.
30 May 2006 ldns(3)