Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
Dear all,
Does anyone know how I could to add a column of numbers (1s, or 2s, or..., or 6s) to two-column text files (tab-delimited), where the specific number to be added varies as a function of the file naming?
Currently, each of my text files has two columns, so the column with the... (12 Replies)
Good afternoon to everyone,
I have some input and output from various widgets that I am trying to get to play nicely together. Basically I would like to stay out of excel and be able to automate the entire process. I have read some posts here about how to use awk, nawk, etc, to do similar... (9 Replies)
Hi All ,
Kindly help me with this soln
awk '{printf "%s %7s \n", $1,$c}' infile
where
value of variable c I am externally giving input
But executing the above command shows all the columns of infile where as I want only 1st column of infile and 2nd column should print value c (8 Replies)
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
Input:
19625 10.4791768259
19700 10.8146489183
19701 10.9084026759
19702 10.9861346978
19703 10.9304364984
Output:
NA19625 10.4791768259
NA19700 10.8146489183... (1 Reply)
Hi,
I have a tab delimited text file with three different columns. I want to add an extra column to the text file. The extra column will be the second column and it will equal third column - 1. How do I go about doing that? Thanks!
Input:
chr1 788822 rs11240777
chr1 1008567 rs9442372... (2 Replies)
Hi,
I would like to add a new column containing the row numbers to a text file. How do I go about doing that? Thanks!
Example input:
A X
B Y
C D
Output:
A X 1
B Y 2
C D 3 (5 Replies)
Hi,
I am not so familiar with bash scripting and would appreciate your help here.
I have a text file 'input.txt' like this:
2 3 4
5 6 7
8 9 10
I want to store each column in an array like this
a ={2 5 8}, b={3 6 9}, c={4 7 10}
so that i can access any element, e.g b=6 for the later use. (1 Reply)
Hi Folks,
I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file.
bash scripting is what i need.
Data.txt
Name OrderID Quantity
Sam 123 300
Jay 342 498
Kev 78 2500
Sam 420 50
Vic 10... (3 Replies)
Hello,
Can someone please help in below requirement.
My requirement is to add date before to first column,some text before 1st,2nd coulmns and insert a new column in between 2 and 3 columns.
input file.
aa 123 dddd
aa 667 kdkdk
ddj 738 kkkk
aa 123 dddd
aa 667 ... (5 Replies)
Discussion started by: Cva2568
5 Replies
LEARN ABOUT OPENSOLARIS
dlpi_bind
dlpi_bind(3DLPI) Data Link Provider Interface Library Functions dlpi_bind(3DLPI)NAME
dlpi_bind - bind DLPI handle
SYNOPSIS
cc [ flag ... ] file ... -ldlpi [ library ... ]
#include <libdlpi.h>
int dlpi_bind(dlpi_handle_t dh, uint_t sap, uint_t *boundsap);
DESCRIPTION
The dlpi_bind() function attempts to bind the DLPI handle dh to the SAP sap. The handle must be in the DL_UNBOUND DLPI state and will tran-
sition to the DL_IDLE DLPI state upon success. Some DLPI MAC types can bind to a different SAP than the SAP requested, in which case bound-
sap returns the actual bound SAP. If boundsap is set to NULL, dlpi_bind() fails if the bound SAP does not match the requested SAP. If the
caller does not care which SAP is chosen, DLPI_ANY_SAP can be specified for sap. This is primarily useful in conjunction with dlpi_promis-
con() and DL_PROMISC_SAP to receive traffic from all SAPs. If DLPI_ANY_SAP is specified, any transmitted messages must explicitly specify a
SAP using dlpi_send(3DLPI).
Upon success, the caller can use dlpi_recv(3DLPI) to receive data matching the bound SAP that is sent to the DLPI link associated with dh.
In addition, the caller can use dlpi_send(3DLPI) to send data over the bound SAP address associated with DLPI handle dh. The physical
address of the bound handle can be retrieved with dlpi_info(3DLPI).
RETURN VALUES
Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI
error value defined in <sys/dlpi.h> or an error value listed in the following section is returned.
ERRORS
DLPI_EBADMSG Bad DLPI message
DLPI_EINHANDLE Invalid DLPI handle
DLPI_ETIMEDOUT DLPI operation timed out
DLPI_EUNAVAILSAP Unavailable DLPI SAP
ATTRIBUTES
See attributes(5) for description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO dlpi_info(3DLPI), dlpi_recv(3DLPI), dlpi_send(3DLPI), dlpi_unbind(3DLPI), libdlpi(3LIB), attributes(5)SunOS 5.11 22 Aug 2007 dlpi_bind(3DLPI)