Sponsored Content
Full Discussion: Average select rows
Top Forums Shell Programming and Scripting Average select rows Post 303009052 by RudiC on Friday 8th of December 2017 10:58:45 AM
Old 12-08-2017
Difficult to believe as what I got was EXACTLY what you posted as desired output. It's not in vain that posters in here are requested to show at least their OS and shell versions, if not the tools used versions.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Calculating the Number of Rows and Average

Hi All I like to know how can we calculate the number of rows and the average of the values present in the file. I will not know what will be the rowcount, which will be dynamic in nature of the file. eg. 29 33 48 30 28 (6 Replies)
Discussion started by: pk_eee
6 Replies

2. Shell Programming and Scripting

Script to find the average of a given column and also for specified number of rows??

Hi friends I have 100 files in my directory. Each file look like this.. Temp1 Temp2 Temp3 MAS 1 2 3 MAS 4 5 6 MAS 7 8 9 Delhi 10 11 12 Delhi 13 14 15 Delhi 16 17 ... (4 Replies)
Discussion started by: ks_reddy
4 Replies

3. Shell Programming and Scripting

Script to find the average of a given column and also for specified number of rows?

Hi Friends, In continuation to my earlier post https://www.unix.com/shell-programming-scripting/99166-script-find-average-given-column-also-specified-number-rows.html I am extending my problem as follows. Input: Column1 Column2 MAS 1 MAS 4 ... (2 Replies)
Discussion started by: ks_reddy
2 Replies

4. Shell Programming and Scripting

Average calculation based on number of rows

Dear users, I need your support, I have a file like this: 272134.548 6680572.715 272134.545 6680572.711 272134.546 6680572.713 272134.548 6680572.706 272134.545 6680572.721 272134.543 6680572.710 272134.544 6680572.715 272134.543 6680572.705 272134.540 6680572.720 272134.544... (10 Replies)
Discussion started by: Gery
10 Replies

5. UNIX Desktop Questions & Answers

Calculate average for rows in a text file

Dear Gurus, I have tab-delimited text files with matrix containing values. The first column is a identifier and other columns have the corresponding values. I would like to calculate the average value (total number/number of entries) for all entries from 2nd column to the last column in row... (3 Replies)
Discussion started by: Unilearn
3 Replies

6. Shell Programming and Scripting

average of rows with same value in the first column

Dear All, I have this file tab delimited A 1 12 22 B 3 34 33 C 55 9 32 A 12 81 71 D 11 1 66 E 455 4 2 B 89 4 3 I would like to make the average every column where the first column is the same, for example, A 6,5 46,5 46,5 B 46,0 19,0 18,0 C 55,0 9,0 32,0 D 11,0 1,0 66,0... (8 Replies)
Discussion started by: paolo.kunder
8 Replies

7. Shell Programming and Scripting

Calculate average of rows between two specific patterns

Hi, I have a file like this: variableStep chrom=chrX span=1 92328 0 92329 0 92330 0 92331 0 92332 0 92333 0 ................ ................ ................ variableStep chrom=chrX span=1 45649610 -0.00386 45649611 1.56 45649612 -2.23 45649613 ... (2 Replies)
Discussion started by: Ranajit_Das
2 Replies

8. UNIX for Dummies Questions & Answers

Writing a script to take the average of two columns every 3 rows

I have a dataset with 120 columns. I would like to write a script, that takes the average of every two columns, starting from columns 2 and 3, and moving consecutively in frames of 3 columns, all the way until the last column. The first column in the output file would be the averages of columns... (1 Reply)
Discussion started by: evelibertine
1 Replies

9. Shell Programming and Scripting

Average values of duplicate rows

I have this file input.txt. I want to take average column-wise for the rows having duplicate gene names. Gene Sample_1 Sample_2 Sample_3 gene_A 2 4 5 gene_B 1 2 3 gene_A 0 5 7 gene_B 4 5 6 gene_A 11 12 13 gene_C 2 3 4 Desired output: gene_A 4.3 7 8.3 gene_B 2.5 3.5 4.5 gene_C 2 3 4... (6 Replies)
Discussion started by: Sanchari
6 Replies

10. Shell Programming and Scripting

Average across rows with a condition

Hi Friends, My input file Gene1 10 20 0 Gene2 5 0 15 Gene3 10 10 10 Gene4 5 0 0 If there is a zero for any gene in any column, I don't want that column to be considered which reduces the denominator value during average. Here is my output Gene1 10 20 0 10 Gene2 5 0 15 10 Gene3... (5 Replies)
Discussion started by: jacobs.smith
5 Replies
yppasswd(1)						      General Commands Manual						       yppasswd(1)

NAME
yppasswd, ypchfn, ypchsh - change your password in the NIS database SYNOPSIS
yppasswd [-f] [-l] [-p] [user] ypchfn [user] ypchsh [user] DESCRIPTION
In the old days, the standard passwd(1), chfn(1) and chsh(1) tools could not be used under Linux to change the users NIS password, shell and GECOS information. For changing the NIS information, they were replaced by their NIS counterparts, yppasswd, ypchfn and ypchsh. Today, this versions are deprecated and should not be used any longer. Using the command line switches, you can choose whether to update your password -p, your login shell -l, or your GECOS field -f, or a com- bination of them. yppasswd implies the -p option, if no other option is given. If you use the -f or -l option, you also need to add the -p flag. ypchfn implies the -f option, and ypchsh -l. When invoked without the user argument, the account information for the invoking user will be updated, otherwise that of user will be updated. This option is only available to the super-user. If the yppasswdd daemon on the server supports it, you can give the root password of the server instead of the users [old] password. All tools will first prompt the user for the current NIS password needed for authentication with the yppasswdd(8) daemon. Subsequently, the program prompts for the updated information: yppasswd or -p Change the user's NIS password. The user is prompted for the new password. While typing the password, echoing is turned off, so the password does not appear on the screen. An empty password is rejected, as are passwords shorter than six characters. The user will then be requested to retype the password to make sure it wasn't misspelled the first time. ypchsh or -l Change the user's login shell. The user is prompted for a new shell, offering the old one as default: Login shell [/bin/sh]: _ To accept the default, simply press return. To clear the shell field in your passwd(5) file entry (so that the system's default shell is selected), enter the string none. ypchfn or -f Change the user's full name and related information. Traditionally, some applications expect the GECOS field (field 4) of the passwd(5) file to contain the user's real name (as opposed to the login name) plus some additional information like the office phone number. This information is displayed by finger(1) and probably some other tools, too. When setting the full name, ypchfn displays the following prompts, with the defaults in brackets: Name [Joe Doe]: Location [2nd floor, bldg 34]: Office Phone [12345]: Home Phone []: To accept a default, simply press return. To clear a field, enter the string none. SEE ALSO
chfn(1), chsh(1), finger(1), passwd(5), passwd(1), ypcat(1), yppasswdd(8), ypserv(8), ypwhich(1) AUTHOR
yppasswd is part of the yp-tools package, which was written by Thorsten Kukuk <kukuk@linux-nis.org>. YP Tools 2.12 April 2010 yppasswd(1)
All times are GMT -4. The time now is 10:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy