Sponsored Content
Top Forums Shell Programming and Scripting Taking the averages of columns with deletion of some lines Post 302806147 by begin_shell on Sunday 12th of May 2013 03:13:17 PM
Old 05-12-2013
hi thanks for your reply. But it works properly but my intention is NOT fulfilled. the script displays the average for x,y,z columns all over the file. But, what i need to find the Averages of X,Y,Z at particular steps separately and save in one file as shown in EXPECTED OUTPUT.

Here , when i run the script, it display only one set of X,Y,Z average values for both the steps combined. But, i wanted to get the averages at step 1 and a separate average at step2.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Deletion of lines in a text file

Hi Everyone, Please help me with this. I have gone through many posts here but couldn't find what I wanted. I have a file with 79000+ lines and I want to delete lines in a pattern. I want to delete every 141st line in the file, starting from line 2000 till 50000. Please help guys. ... (8 Replies)
Discussion started by: max29583
8 Replies

2. UNIX for Dummies Questions & Answers

deletion of all lines ends with :

I have below file say temp1 BSCAJM1:HWJA10C BSCAJM1: BSCALW1: BSCALW1:GVND01B BSCALW1: BSCALW1: BSCBKNR:IJNMKTA BSCBKNR: BSCJOD1: BSCJOD1:JOD121B i want to delete all the lines ending with : and have below output BSCAJM1:HWJA10C BSCALW1:GVND01B BSCBKNR:IJNMKTA... (8 Replies)
Discussion started by: lalchand
8 Replies

3. Shell Programming and Scripting

Operations on a file with Deletion , Modification and Insertion of lines

Hi All , Given a file , I need to delete , modify and insert lines matching certain patterns in that file using shell scripting. e.g. If a file FILE1 has following content : CUST.ABC.DEF = CUST.ABC.DEF * CUST.ABC.DEF PRINTF(CUST.ABC.DEF) CUST.ABC.DEF = mid(CUST.ABC.DEF,10.34)... (5 Replies)
Discussion started by: swapnil.nawale
5 Replies

4. Shell Programming and Scripting

Taking 3 greped/awked lines of text

Say I used grep and awk for taking text out of a text file... I now /have 3 lines of text that I want to combine to make 1 line. What command could I use to do this? ... display line 1 twice then sed s/$line1/$line2/ ????... display line 2 twice then sed s/$line2/$line3/ (2 Replies)
Discussion started by: puttster
2 Replies

5. Shell Programming and Scripting

Comparison and deletion of lines between two files

Hi i need an help. I have two files list1 and list2, both contains the server names i want to delete the servers in list2 which were also found in list1. for an eg list2 list1 oradg1 oradg4 oradg2 oradg2 oradg3 ... (5 Replies)
Discussion started by: sudharson
5 Replies

6. Shell Programming and Scripting

Calculate Averages !

Hi, I have a file with more than 2,000 rows like this: 05/26/2011,1200,1500 I would like to create a awk shell script that calculate the price average of the second and third field each 5,10 and 20 rows or ask me for the values, starting at first row. Finally compare the average value... (1 Reply)
Discussion started by: csierra
1 Replies

7. Shell Programming and Scripting

Moving Averages SMA !

Hello, I am trying to create a awk script to calculate the simple moving average of two fields but I got only the result of the first field. Could you please help me to fix this awk shell script awk -F, -v points=5 ' { a = $2; b = $3; if(NR>=points) { total_a = 0; total_b... (1 Reply)
Discussion started by: csierra
1 Replies

8. UNIX for Dummies Questions & Answers

Taking the average of two columns and printing it on a new column

Hi, I have a space delimited text file that looks like the following: Aa 100 200 Bb 300 100 Cc X 500 Dd 600 X Basically, I want to take the average of columns 2 and 3 and print it in column 4. However if there is an X in either column 2 or 3, I want to print the non-X value. Therefore... (11 Replies)
Discussion started by: evelibertine
11 Replies

9. How to Post in the The UNIX and Linux Forums

Daily averages...

I have date file like below.. 1995 1 2 10 29 38.6706 -6.53823 41.9201 1995 1 2 10 29 -49.2477 -4.59733 17.2704 1995 1 2 10 29 -49.2369 -4.48045 8.61348 1995 1 3 8 48 -42.2643 ... (3 Replies)
Discussion started by: athithi
3 Replies

10. Shell Programming and Scripting

Merging multiple lines to columns with awk, while inserting commas for missing lines

Hello all, I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person. In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
PCV(1)							       Picviz Documentation							    PCV(1)

NAME
pcv - Picviz console veritable tool SYNOPSIS
pcv -Toutput_plugin [-Rrender_plugin] [options] file.pcv ['filter'] DESCRIPTION
pcv allows to compile PCV files into a plugin choosen format, such as svg, csv, png or other. -Tplugin Replace 'plugin' with a output plugin name. See plugin section -Rplugin Replace 'plugin' with a render plugin name. See plugin section options can be either one or several among: -A argument Provides arguments to the render and output plugin -a Displays all text along with lines -d Activates debug mode -Ln Draw text every n line -l Skip learning mode -o file Output to the given file instead of stdout -p file Use given file to store PID -r...(rrr) Increases image height and width -s socket.name Create the socket.name and listen to it (for real-time capabilities) -t template Use the given template when listening to a socket -Warg Use Picviz with a special keyword. See keywords section The filter parameter is explained in the filter section below. PLUGINS
Plugins are located with ld, search path can be overridden with PICVIZ_PLUGINS_PATH environment variable. Output Output data in the wanted file format. Available plugins are: svg plplot csv sdl pngcairo debug Render Modify data rendering. Available plugins are: heatline: possible arguments (-A): virus debug KEYWORDS
Keywords are special parameters given to picviz to use a library along with parsing and rendering. This is deactivated by default because it makes the program slow, but it may be very usefull in certain cases. Following keywords are accepted: pcre: activates pcre pattern matching for filtering (pcv -Tsvg -Wpcre file.pcv 'show value = ".*foo.*" on axis 1') FILTER
pcv allows filtering to choose data you want to see displayed. When the pcv language parser is called, a Pcv Image Filter (PIF) is applied. It allows to filter either before any data is calculated (data filter), once calculated and before adding the line to the image (pre line filter) or, once other lines have been added and ask for specific removales (post line filter). Relations Filter relation can be either: = equal != not equal < less than > greater than <= less or equal >= greater or equal Selecting plot value plot: Will select the value, as plotted by the engine. Accepted values can be the y position on the axis or the relative percentage. 'show plot > 100 on axis 3': will display only lines which have their plot on the axis 3 greater than 100 can be called like this: Example: pcv -Tsvg file.pcv 'show plot > 100 on axis 3' By default, the image height is 500 pixels, so this filter is equivalent than > 100: 'show plot > 20% on axis 3'. It is possible to filter using multi-criterion values: 'show plot > 20% on axis 3 and plot < 42 on axis 5' Pattern matching Values can be selected, either with their original text string, or by using pattern matching. By default, pattern matching is not activated. Pattern matching activated is done with -Wpcre argument. To filter values with [0-9][aA].*, you can type: pcv -Tsvg file.pcv -Wpcre 'show value = "[0-9][aA].*" on axis 1'. Note that with string comparisons (with value), only the equal (=) relation is accepted. EXAMPLE
pcv -Tsvg file.pcv pcv -Tpngcairo file.pcv -rrrr -a > file.png pcv -Tpngcairo -Rheatline -Avirus file.pcv > file.svg pcv -Tpngcairo -s local.sock -t file.pcv -o file.png '' BUGS
If you are sure you are not dealing with a feature, you can report BUGS using the trac ticketing system available at http://www.wallinfire.net/picviz. AUTHORS
Man page written by Sebastien Tricaud toady gscore org. perl v5.10.0 2008-12-21 PCV(1)
All times are GMT -4. The time now is 06:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy