Following bash script for matched the ddd in the file1 and get the file contents from the file2.After matching the ddd in the file ,it will append the mmm at the end of the line.
I am trying to do some thing like this ..
In a file , if pattern found insert new pattern at the begining of the line containing the pattern.
example:
in a file I have this.
gtrow0unit1/gctunit_crrownorth_stage5_outnet_feedthru_pin
if i find feedthru_pin want to insert !! at the... (7 Replies)
Hi All,
I am new to shell scripting and need help in scripting using CSH.
Here is what I am trying to so,
1. Search a specific string e.g. "task" from "task (input1, out1)".
2. Extract the arguements "input1" and "out1"
3. Add them in separate lines below. eg. "int input1" , " integer out1"
... (7 Replies)
Hi All,
I have the Overview.csv file like below format
Message ID Sendout Group Name Email Subject Name Type Rcpts Responses Response Rate Open Rate Click Rate
2000009723 01-22-2014 16:14 Test_GroupPQA2013 000123@yahoo.com INFO RISQUE D'INONDATION... (3 Replies)
Hi all,
I have table like this
A1
1 2
1 3
2 4
A2
3 1
1 2
1 1
A3
1 1
2 0
3 2
.....
An
And i want to add column to my table and the table will become like this : (3 Replies)
Want to search a pattern in column
using the below command which not helpful
awk -F"\|" '$1 == '"${VAR}"' {print $1,$2}' file
how to search using "==" with variable other than the below case.
awk -F"\|" '$1 ~ /'"${VAR}"'/ {print $1,$2}' file (14 Replies)
Hi Experts
I have small query where I request the into a single file
Suppose:
File1: {Unique entries}
AA
BB
CC
DD
FileB:
AA, 123
AA, 234
AA, 2345
CC, 123
CC, 5678
DD,123
BB, 7890 (5 Replies)
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Hi all,
I have searched and searched, but I have not found a solution that quite fits what I am trying to do.
I have a long list of data in three columns. Below is a sample:
1,10,8
2,12,10
3,13,12
4,14,14
5,15,16
6,16,18
Please use code tags
What I need to do is as follows: If a... (4 Replies)
Experts,
Need your support for this awk script.
we have only one input file, all these column 1 and column 2 are in same file and have to do lookup for values in one file(column1 and column2) but output we need in another file
Need to grep row whose string contains 9K from column 1. When found... (6 Replies)
Discussion started by: as7951
6 Replies
LEARN ABOUT OSF1
inet_pton
inet_pton(3) Library Functions Manual inet_pton(3)NAME
inet_pton - Converts a text string to a numeric address
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <arpa/inet.h>
int inet_pton ( int af, const char *src, void *dst) ;
PARAMETERS
Specifies the address family. Valid values are AF_INET for an Internet Protocol Version 4 (IPv4) address and AF_INET6 for an IPv6 address.
Points to the address text string to be converted. Points to a buffer that is to contain the numeric address.
DESCRIPTION
The use of this routine is deprecated. Use the getaddrinfo(3) routine instead; it is also protocol-independent.
The inet_pton() function converts a text string to a numeric value in Internet network-byte order.
If the af parameter is AF_INET, the function accepts a string in the standard IPv4 dotted-decimal form: ddd.ddd.ddd.ddd
In this format, ddd is a one to three digit decimal number between 0 and 255.
If the af parameter is AF_INET6, the function accepts a string in the following form: x:x:x:x:x:x:x:x
In this format, x is hexadecimal value of a 16-bit piece of the address.
IPv6 addresses can contain long strings of zero (0) bits. To make it easier to write these addresses, you can use double colon characters
(::) one time in an address to represent 1 or more 16-bit groups of zeros.
For mixed IPv4 and IPv6 environments, the following form is also accepted: x:x:x:x:x:x:ddd.ddd.ddd.ddd
In this form, x is hexadecimal value of a 16-bit piece of the address and ddd is a one to three digit decimal value between 0 and 255 that
represents the IPv4 address. See RFC 2373 for more information on IPv6 addressing formats.
The calling application is responsible for ensuring that the buffer referred to by the dst parameter is large enough to hold the numeric
address. AF_INET addresses require 4 bytes and AF_INET6 addresses require 16 bytes.
RETURN VALUES
Upon successful completion, the inet_pton() function returns 1. If the input string is not a valid IPv4 dotted-decimal string or a valid
IPv6 address string, the function returns 0. If any other error occurs, the function returns -1.
ERRORS
If the inet_pton() routine call fails, errno is set to one of the following values: The address family specified in the af parameter is
unknown.
RELATED INFORMATION
Functions: getaddrinfo(3), inet_ntop(3).
RFC 2373, IP Version 6 Addressing Architecture delim off
inet_pton(3)