Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Sum third column in a file when 1 and 2 repeat Post 302904541 by bartus11 on Wednesday 4th of June 2014 03:45:24 PM
Old 06-04-2014
What would be the desired output for that sample data?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sum up a decimal column in a tab separated text file and error handling

Hi, I have a small requirement where i need to sum up a column in a text file. Input file 66ab 000000 534385 -00000106350.00 66cd 000000 534485 -00013364511.00 66ad 000000 534485 -00000426548.00 672a 000000 534485 000000650339.82... (5 Replies)
Discussion started by: pssandeep
5 Replies

2. Shell Programming and Scripting

Sum of 286th column using awk in a file

Hi, I am using the following code to find the sum of the values of column 286 in a file. It will have the Decimal values with the scale of 2. Delimiter is '|^' cut -d'|^' -f286 filename|cut -c3-| awk '{ x += $1 } END { printf("%.2f\n", x) }' There are around 50k records in this file... (2 Replies)
Discussion started by: Jram
2 Replies

3. Shell Programming and Scripting

Help with subtraction column by column and repeat print out with N

Input file: 2 10 15 20 24 Output file 2 8 NNNNNNNN 10 5 NNNNN 15 5 NNNNN 20 4 NNNN 24 Do anybody experience subtraction column by column and print out number of subtraction times with N? The second column of the output file is the subtraction of 10-2 = 8; The third column just... (3 Replies)
Discussion started by: perl_beginner
3 Replies

4. Shell Programming and Scripting

Sum values of specific column in multiple files, considering ranges defined in another file

I have a file (let say file B) like this: File B: A1 3 5 A1 7 9 A2 2 5 A3 1 3 The first column defines a filename and the other two define a range in that specific file. In the same directory, I have also three more files (File A1, A2 and A3). Here is 10 sample lines... (3 Replies)
Discussion started by: Bastami
3 Replies

5. UNIX for Dummies Questions & Answers

Match sum of values in each column with the corresponding column value present in trailer record

Hi All, I have a requirement where I need to find sum of values from column D through O present in a CSV file and check whether the sum of each Individual column matches with the value present for that corresponding column present in the trailer record. For example, let's assume for column D... (9 Replies)
Discussion started by: tpk
9 Replies

6. Shell Programming and Scripting

Repeat same word in the rest of the column.

My input is: a.txt computer b.txt c.txt e.txt I want my output to be: a.txt computer b.txt computer c.txt computer e.txt computer There are about 100000 text files having the same format as my input data. What I am doing now is too slow and also requires plenty of scripts. 1. wc -l all... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

7. Shell Programming and Scripting

awk to Sum columns when other column has duplicates and append one column value to another with Care

Hi Experts, Please bear with me, i need help I am learning AWk and stuck up in one issue. First point : I want to sum up column value for column 7, 9, 11,13 and column15 if rows in column 5 are duplicates.No action to be taken for rows where value in column 5 is unique. Second point : For... (1 Reply)
Discussion started by: as7951
1 Replies

8. UNIX for Beginners Questions & Answers

Copy columns from one file into another and get sum of column values and row count

I have a file abc.csv, from which I need column 24(PurchaseOrder_TotalCost) to get the sum_of_amounts with date and row count into another file say output.csv abc.csv- UTF-8,,,,,,,,,,,,,,,,,,,,,,,,, ... (6 Replies)
Discussion started by: Tahir_M
6 Replies

9. UNIX for Beginners Questions & Answers

How to sum value of a column by range defined in another file awk?

I have two files, file1.table is the count table, and the other is the range condition file2.range. file1.table chr start end count N1 0 48 1 N1 48 181 2 N1 181 193 0 N1 193 326 2 N1 326 457 0 N1 457 471 1 N1 471 590 2 N1 590 604 1 N1 604 752 1 N1 752 875 1 file2.range... (12 Replies)
Discussion started by: yifangt
12 Replies

10. UNIX for Beginners Questions & Answers

Sum in file based column

Hi All, I have a file as below and want to sum based on the id in the first column Input 10264;ATE; 12 10265;SES;11 10266AUT;50 10264;ATE;10 10265;SES;13 10266AUT;89 10264;ATE;1 10265;SES;15 10266AUT;78 Output 10264;ATE; 23 10265;SES;39 10266AUT;139 (6 Replies)
Discussion started by: arunkumar_mca
6 Replies
esdsample(1)							   User Commands						      esdsample(1)

NAME
esdsample - play a sample SYNOPSIS
esdsample [-s hostname:port] [-b] [-d] [-e] [-h] [-m] [-r freq] samplename DESCRIPTION
The esdsample utility plays a sample using the Enlighted Sound Daemon (esd). OPTIONS
The following options are supported: -s hostname:portContact the esd server on hostname at port. -b Specify that the output should be in 8-bit format. By default, the output is in 16-bit format. -d Play the sample from file as raw data. The default behavior is to read the data from a sound file (.wav, .au, and so on). If this option is chosen, samplename is the name of a file. -e Play the sample from the esd cache. If this option is chosen, samplename is the name of the sample in the cache. -h Display help text, and exit. -m Specify that the output should be in mono format. By default, the output is in stereo format. -r freq Specify that the output rate should be set to freq. By default, the output rate is set to 44.1 kHz. OPERANDS
The following operands are supported: samplename The name of the sample to be played. If the -e option is used, samplename is the esd cache name. Otherwise, samplename is a filename. EXAMPLES
Example 1: Playing a sample from a file example% esdsample generic.wav Example 2: Playing a sample from the esd cache example% esdsample -e esdctl:generic.wav (where esdctl:generic.wav is the cache name) EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/esdsample Executable for Enlightened Sound Daemon sound sampler. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-audio | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
esdcat(1), esdmon(1), esdplay(1), esdrec(1), esdctl(1), esd-config(1), libesd(3) NOTES
Written by Brian Cameron, Sun Microsystems Inc., 2003. SunOS 5.10 8 Jan 2003 esdsample(1)
All times are GMT -4. The time now is 11:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy