07-07-2016
So does the
NR == 1 store the header that is already there? Thank you
.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a huge text file. It looks like
abcde bangalo country 12345 lastfield
i want to get first 3 characters from field1 and first 3 characters from field 2 and insert the result as a new field. example the result should be:
abcde bangalo abcban country 12345 lastfield
Please... (4 Replies)
Discussion started by: ajithshankar@ho
4 Replies
2. Shell Programming and Scripting
Dear All,
I would like to add values of a field, if the lines match in a certain field. Then I would like to divide the sum though the number of lines that have a matched field. This is the Input:
Input:
Test1 5
Test1 10
Test2 2
Test2 5
Test2 13
Test3 4
Output:
Test1 7.5
Test1 7.5... (6 Replies)
Discussion started by: DerSeb
6 Replies
3. Shell Programming and Scripting
Hi,
I have a file with following lines:
chr1 10 AC=2;AF=1.00;AN=2;DP=2;Dels=0.00;HRun=0;HaplotypeScore=0.00;MQ=23.00;MQ0=0;QD=14.33;SB=-10.01
chrX 18 AB=0.52;AC=1;AF=0.50;AN=2;DP=203;DS;Dels=0.00;HRun=0;HaplotypeScore=20.01;MQ=15.63;MQ0=85;QD=12.80;SB=-1289.58
I need to extract 4... (2 Replies)
Discussion started by: menenuh
2 Replies
4. Shell Programming and Scripting
I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work.
Brief overview:
I have user input a line to a variable, I then find a specific value in this line 10th field in this case. After asking for new input and doing some... (14 Replies)
Discussion started by: crownedzero
14 Replies
5. UNIX for Dummies Questions & Answers
Hello,
:wall:
I have a 12 column csv file. I wish to delete the entire line if column 7 = hello and column 12 = goodbye. I have tried everything that I can find in all of my ref books.
I know this does not work
/^*,*,*,*,*,*,"hello",*,*,*,*,"goodbye"/d
Any ideas?
Thanks
Please... (2 Replies)
Discussion started by: Chris Eagleson
2 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to insert two columns in the following text. I tried awk but failed to achieve. Highly appreciate your help
DATETIME="28-Sep-2013;20:09:08;"
CONTROL="AB"
echo "Myfile.txt;11671;7824.90;2822.48"
The DATETIME will be inserted at the beginning and CONTROL will... (4 Replies)
Discussion started by: angshuman
4 Replies
7. Shell Programming and Scripting
Gents,
I have many files to change increasing 40000 in specific field.
Can you help me with a command with sed or awk to fix this problem.
Where the the field has Marker FDU. I need to add 40000 plus
example
Marker FDU 27152.00
Marker FDU 67152.00
I should... (4 Replies)
Discussion started by: jiam912
4 Replies
8. Shell Programming and Scripting
Greetings.
I've got a csv file with data along these lines:
Spumoni's Pizza Place, Placemats n Things, Just Lamps
Counterfeit Dollars by Vinnie, Just Shades, Dollar StoreI want to replace the entire comma-delimited field if it matches something ending in "Place" or beginning with "Dollar",... (2 Replies)
Discussion started by: palmfrond
2 Replies
9. Shell Programming and Scripting
In the tab-delimited input below I am trying to use awk to -10 from $2 and +10 to $3. Something like
awk -F'\t' -v OFS='\t' -v s=10 '{split($4,a,":"); print $1,$2-s,$3+s,a,$5,$6} | awk {split(a,b,"-"); print $1,$2-s,$3+s,b-s,b+s,$5,$6}' input
should do that. I also need to -10 from $4... (2 Replies)
Discussion started by: cmccabe
2 Replies
10. Shell Programming and Scripting
In the below I am trying to use awk to match all the $13 values in input, which is tab-delimited,
that are in $1 of gene which is just a single column of text.
However only the line with the greatest $9 value in input needs to be printed.
So in the example below all the MECP2 and LTBP1... (0 Replies)
Discussion started by: cmccabe
0 Replies
LEARN ABOUT DEBIAN
rpchdr
RpcHdr(3I) InterViews Reference Manual RpcHdr(3I)
NAME
RpcHdr - header for remote procedure calls
SYNOPSIS
#include <Dispatch/rpchdr.h>
DESCRIPTION
An RpcHdr enables an RPC request to be sent or received. To send an RPC request, you would insert an RpcHdr into an rpcstream followed by
any arguments and then flush the rpcstream if you wanted the request to be sent immediately. The rpcstream automatically fills in each RPC
request's length field. To receive an RPC request, you would extract an RpcHdr from an rpcstream and examine the ``request()'' member to
determine which additional arguments need to be extracted as well. You can examine the ``ndata()'' member too if you need to estimate how
much space to allocate.
CONSTRUCTORS
RpcHdr(void* writer, int request)
RpcHdr(int request)
RpcHdr()
Construct an initialized header for an outgoing RPC request (first two constructors) or construct an uninitialized header for an
incoming RPC request (third constructor). To initialize the header, you'll have to store the request's protocol number. You can
also store the address of the writer sending the RPC request if you want to route the RPC request to a specific reader on the peer's
side.
PUBLIC OPERATIONS
unsigned long reader()
int request()
unsigned int ndata()
Get information about the RPC request. ``reader()'' identifies the reader which should handle the RPC request. ``request()'' iden-
tifies the action that should be performed. ``ndata()'' gives the number of data bytes following the header, which may be useful
for estimating the amount of space that must be allocated to store an argument.
SEE ALSO
RpcReader(3I), RpcWriter(3I), rpcstream(3I)
InterViews 27 March 1991 RpcHdr(3I)