Sponsored Content
Full Discussion: Arrange output of a command
Operating Systems Linux Arrange output of a command Post 302967274 by RavinderSingh13 on Monday 22nd of February 2016 06:00:26 AM
Old 02-22-2016
Hello Raj999,

As you haven't showed us the complete sample input of ps -auxwww. So following may help you in same though we could make it more simpler within single awk etc.
Code:
Your_previous_command(which I haven't tested/tried) | awk '{SUM+=$1;print} END{print "Total " SUM}'

Please let us know if you have any queries with complete sample inputs and output of ps -auxwww.

Thanks,
R. Singh

Last edited by RavinderSingh13; 02-22-2016 at 07:11 AM..
This User Gave Thanks to RavinderSingh13 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

re arrange the columns

Hi - can any one let me know how to re-arrange the columns of a comma seperated file. The problem here is that the colums some times have new lines and when the columns has new lines or extra comma's then it is enclosed in double quotes("). Can any one tell me how to re-arrange the columns now. ... (0 Replies)
Discussion started by: ahmedwaseem2000
0 Replies

2. UNIX for Dummies Questions & Answers

how to sort and arrange an output

ok so I have a list of names that end in either ot,om,oa. So for example DETOT MANOA DET0M DET0A MANOT SEAOT etc... I want to be able to group this list by OT, OM, OA and have the output have some headers like this and be alphabatized and if possible be in colums instead of like... (10 Replies)
Discussion started by: llsmr777
10 Replies

3. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

4. UNIX for Dummies Questions & Answers

Arrange data

I have a following data: 100 200 300 400 I want the data to be arranged: 100 200 300 400 What is the best way to do this? Thanks! (5 Replies)
Discussion started by: bobo
5 Replies

5. Shell Programming and Scripting

Re-arrange column

10.142.7.155 - - www.abc.com 404 - I have many columns which is tab delimited file, I have to re-arrange this to a particular column and also add "-" to 3rd column and 6th column. 10.142.7.155 - - - www.abc.com - 404 - (4 Replies)
Discussion started by: sandy1028
4 Replies

6. Shell Programming and Scripting

Arrange output based on rows into columns

Hi All, I would like to ask help on how can i achieve below output. Inputfile: Oct11,apa1-daily,01:25:01 Oct11,apa2-daily,01:45:23 Oct12,apa1-daily,02:30:11 Oct12,apa2-daily,01:55:01 Oct13,apa1-off,01:43:34 Oct13,apa2-off,01:22:04 Desired output: Clients ... (3 Replies)
Discussion started by: mars101
3 Replies

7. UNIX for Dummies Questions & Answers

passing command output from one command to the next command in cshell

HI Guys, I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that 1) I need to enter these commands $ echo $DISPLAY $ setenv $DISPLAY output_of_echo_$display_command How can i write a... (2 Replies)
Discussion started by: kaaliakahn
2 Replies

8. Red Hat

Command understanding the output file destination in case of standard output!!!!!

I ran the following command. cat abc.c > abc.c I got message the following message from command cat: cat: abc.c : input file is same as the output file How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies

9. Shell Programming and Scripting

Insert title as output of command to appended file if no output from command

I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place. What I need The following command is placed at the prompt: TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies

10. Shell Programming and Scripting

sed command to arrange words

Hi I have a text file as given below: Input format I have a text file as given below . This is a (9 Replies)
Discussion started by: my_Perl
9 Replies
mlib_SignalLPCAutoCorrelGetEnergy_F32(3MLIB)		    mediaLib Library Functions		      mlib_SignalLPCAutoCorrelGetEnergy_F32(3MLIB)

NAME
mlib_SignalLPCAutoCorrelGetEnergy_F32 - return the energy of the input signal SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_SignalLPCAutoCorrelGetEnergy_F32(mlib_f32 *engery, void *state); DESCRIPTION
The mlib_SignalLPCAutoCorrelGetEnergy_F32() function returns the energy of the input signal. In linear predictive coding (LPC) model, each speech sample is represented as a linear combination of the past M samples. M s(n) = SUM a(i) * s(n-i) + G * u(n) i=1 where s(*) is the speech signal, u(*) is the excitation signal, and G is the gain constants, M is the order of the linear prediction fil- ter. Given s(*), the goal is to find a set of coefficient a(*) that minimizes the prediction error e(*). M e(n) = s(n) - SUM a(i) * s(n-i) i=1 In autocorrelation method, the coefficients can be obtained by solving following set of linear equations. M SUM a(i) * r(|i-k|) = r(k), k=1,...,M i=1 where N-k-1 r(k) = SUM s(j) * s(j+k) j=0 are the autocorrelation coefficients of s(*), N is the length of the input speech vector. r(0) is the energy of the speech signal. Note that the autocorrelation matrix R is a Toeplitz matrix (symmetric with all diagonal elements equal), and the equations can be solved efficiently with Levinson-Durbin algorithm. See Fundamentals of Speech Recognition by Lawrence Rabiner and Biing-Hwang Juang, Prentice Hall, 1993. PARAMETERS
The function takes the following arguments: energy The energy of the input signal. state Pointer to the internal state structure. RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_SignalLPCAutoCorrelInit_F32(3MLIB), mlib_SignalLPCAutoCorrel_F32(3MLIB), mlib_SignalLPCAutoCorrelGetPARCOR_F32(3MLIB), mlib_SignalLP- CAutoCorrelFree_F32(3MLIB), attributes(5) SunOS 5.10 10 Nov 2004 mlib_SignalLPCAutoCorrelGetEnergy_F32(3MLIB)
All times are GMT -4. The time now is 03:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy