The following awk script creates a file b.dat.
awk '{print substr($0,1,27),substr($2,index($2,"_")+1)," ",substr($0,49)}' a.dat > b.dat
I need this script to be modified to also sum $3 values by distinct $1 and $2
fields.
Current file
W2_2009275 2 8
W2_2009275 2 7
W1_2009275 1... (3 Replies)
Hi people!,
I need extract from the file (test-file.txt) the values between
<context> and </context> tag's , the total are 7 lines,but i can only get 5 or 2 lines!!:confused:
Please look my code:
#awk '/context/{flag=1} /\/context/{flag=0} !/context/{ if (flag==1) p
rint $0; }'... (3 Replies)
Hi,
I want to modifiy the hour in the crontab AIX 5.3 for this line:
Input:
00 22 * * * /outillage/script_exploit/bin/SavOffline.ksh > /dev/null 2>&1
Output:
30 20 * * * /outillage/script_exploit/bin/SavOffline.ksh > /dev/null 2>&1
With the awk or sed function through a ssh -q... (1 Reply)
Hello everyone,
Firstly i do not require alot of help.. i am right at the end of finishing my scipt but cannot find a solution to the last part.
What i need to do is, prompt the user for a file to work with, which i have done.
promt the user for an output file - which is done.
#!/bin/bash... (14 Replies)
Hello,
I have two text files (txt1 and txt2). txt1 contains many lines with a single number in each line. txt2 (xml format) contains information about the numbers given in txt1. I need to insert one line in txt2 within the scope of each number taken from txt1.
Sample problem:
txt1:
12
23... (1 Reply)
Hi ! I'm working into my first bash script to make some xml modification and it's going to make me crazy lol .. so I decide to try into this forum to take some ideas from people that really know about this!
This is my situation I've and xml file with a lots of positional values with another tags... (9 Replies)
Hi All,
I need help from any of you.Would be so thankful for your help.
I/P
DDDD,1045,161,1557,429,1694,800,1911,1113,2460,1457,2917>
1609,3113,1869,3317,2732,3701,3727,4132,5857,5107>
9004,6496
DDDD,1125,157,1558,429,1694,800,1911,1117,2432,1444,2906>... (2 Replies)
Hi,
I have a file which contains the following data
claim_src|clm_id,typ_id
pat_src|pat_id
prov_src|prov_id,clm_id,prov_name
The first field is table name and second field is primary keys of the table
Now I have three files which contain ddl of each table.
clam_src.sql... (4 Replies)
Hello everybody,
I would like modify some strings using sed or another command line with the content file.
For example:
- {fqdn: "server-01" , ip: "server-01"}
- {fqdn: "server-02" , ip: "server-02"}
- {fqdn: "server-03" , ip: "server-03"}
- {fqdn: "server-04" , ip: "server-04"}
My... (4 Replies)
Discussion started by: dco
4 Replies
LEARN ABOUT HPUX
dhcpv6db2conf
dhcpv6db2conf(1M)dhcpv6db2conf(1M)NAME
dhcpv6db2conf - DHCPv6 client database converter
SYNOPSIS
[lan_interfaces]
DESCRIPTION
provides a means of translating the DHCPv6 client database, into a set of standard configuration file variables. The client database con-
sists of a series of records. Each record represents a unique lan interface and a list of attributes, which correspond to that interface.
The attributes are configuration parameters like: host's IP address, NTP server address, address of the DHCPv6 server, NIS domain name etc
for that interface. With you can list the contents of the database to the screen, create a set of configuration staging files, or execute
direct edits on existing configuration files using the values contained in the client database.
Options
allows you to specify a list of lan interfaces on the command line (e.g. whose data needs to be translated to a readable format. If no
lan interface is specified, will process the entries of all interfaces which are UP. The attributes can be selected for processing by
specifying a combination of one or more filter flags on the command line. If no filter flag is specified, all the attributes for that lan
interface will be processed.
The following options are supported:
Using the results of the specified filter, directly apply the variable
definitions to the existing configuration files (for example,
Create a set of staging files using the results of the selected filter(s).
Each variable processed will be applied to its corresponding staging configuration file.
Specifically, will generate a copy of the existing configuration file. For example, will be copied to Once this staging
file has been created, the variable that is being processed will be applied to this newly created file.
Print results to the screen (stdout), this is the default action if neither
nor are specified.
Process the INTERFACE variable set [IPV6_SECONDARY_INTERFACE_NAME, IPV6_ADDRESS, IPV6_PREFIXLEN, DHCPV6_ENABLE].
Process the DNS variable set
[domain, nameserver].
Process the SIP server address and SIP domain name information.
Process the NIS variable set
[NIS_DOMAIN, YPSET_ADDR].
Process the vendor specific information.
Print the DHCPv6 server address.
lan_interfaces lan interfaces such as whose data needs to be translated to a readable format. If not specified, will process the entries
of all interfaces which are UP.
Configuration Files and Variable Names
The following files and variables can be processed:
IPV6_SECONDARY_INTERFACE_NAME
IPV6_ADDRESS
IPV6_PREFIXLEN
DHCPV6_ENABLE
NIS_DOMAIN
YPSET_ADDR
domain / search
nameserver
EXAMPLES
To list the entire contents of the DHCP client database type:
To list only the INTERFACE variable set for type:
AUTHOR
was developed by Hewlett-Packard.
FILES
Client configuration database
SEE ALSO dhcpv6clientd(1M), dhcpv6client_ui(1), dhcpv6d(1M).
dhcpv6db2conf(1M)