Sponsored Content
Top Forums Shell Programming and Scripting Sorting operations on several files Post 302820193 by jim mcnamara on Wednesday 12th of June 2013 10:23:24 AM
Old 06-12-2013
Ok. Is the column9 average based on all files - the average of column9 from grad.1000, grad.1001...grad.nnnn? Or is it based on just the file you are currently working on?

BTW the comparison
Code:
((col [9] / average (col[9]) ) < 1)

is the same as
Code:
(col[9] < average(col[9])

not using division.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

sorting files

ok so I'm having major issues trying to figure this out: I have this program that I'm inputting the files in hte current directory which are image files...it spits out 5 line chunks describing the files... filename: (name of file) size: (100 x 200) arbitrary data arbitrary data arbitrary... (4 Replies)
Discussion started by: Infraredskies
4 Replies

2. Shell Programming and Scripting

Sorting files

Hi, What is the command for sorting files according to their size Thanx in advance (4 Replies)
Discussion started by: sendhil
4 Replies

3. Shell Programming and Scripting

Sorting Files

How to sort such files which contains records of varying length and varying lines? (With respect to Bash shell) Eg: Each record begins with a sting of 1/0(binary) which may or may not be followed by properties like AB,BS etc. I have to sort such records on the basis of 1/0 string and keep the... (2 Replies)
Discussion started by: sandeep_hi
2 Replies

4. Shell Programming and Scripting

Operations on columns of 2 files

Hi I have 2 file with many lines and colums and i want to do some operation for each value in the 2 files : Matrix1 : a11 a12 a13 a14 ... a21 a22 a23 a42 ... a31 a32 a33 a32 ... ... Matrix2 : b11 b12 b13 b14 ... b21 b22 b23 b42 ... b31 b32 b33 b32 ... ... I want to have the... (8 Replies)
Discussion started by: rauchy
8 Replies

5. Shell Programming and Scripting

Matrix Operations of two files

Hi , I have two files aaa.txt (which contains) 1 2 3 4 5 6 7 8 9 10 11 12 and bbb.txt (which contains) -1 -2 -3 -4 -5 -6 5 -8 0 3 0 0 the output that I intended to have is 0 0 0 0 0 0 6 0 4.5 6.5 5.5 6 i.e. Averaging the script is in the file abc Begin{START of the... (2 Replies)
Discussion started by: narendra_linux
2 Replies

6. UNIX for Dummies Questions & Answers

help with sorting files

find / -type f 2> /dev/null | find -inum +1 2> /dev/null | find -mtime -30 2> /dev/null what i am trying to do i search all regular files in root directory with one or more inodes modified within last 30 days. the /dev/null is to suppress the permission denied outputs. i am now trying to... (5 Replies)
Discussion started by: iluvsushi
5 Replies

7. Shell Programming and Scripting

i need help in sorting two files

i have file a 123 234 456 567 678 and file b 123|xxx|hhh|ppp or zzz 234|rrr|ttt|xxx 432|ttt|mmm|nnn 678|cft|byt|mop i want to compare file a to file b such that when each of the lines in file a can be found in file b column1 and also xxx or hhh or ppp or zzz can be... (12 Replies)
Discussion started by: blackzinga80
12 Replies

8. Shell Programming and Scripting

Sorting files

I have the following set of files and I want to order them according to the ascending values of the run: For example, doing ls -lrt *drw*.log gives n02-z30-sr65-rgdt0p25-dc0p08-4x3drw.log n02-z30-sr65-rgdt0p25-dc0p03-8x6drw.log n02-z30-sr65-rgdt0p25-dc0p01-8x6drw.log ... (18 Replies)
Discussion started by: kristinu
18 Replies

9. Shell Programming and Scripting

Complex data sorting in excel files or text files

Dear all, I have a complex data file shown below,,,,, A_ABCD_13208 0 0 4.16735 141044 902449 1293900 168919 C_ABCD_13208 0 0 4.16735 141044 902449 1293900 168919 A_ABCDEF715 52410.9 18598.2 10611 10754.7 122535 252426 36631.4 C_DBCDI_1353 0... (19 Replies)
Discussion started by: AAWT
19 Replies

10. Shell Programming and Scripting

Read and write operations on files.

Dears. kindly guide !!! I have data, which is delimited by | . it should contain 26 columns, but one column data contain | makes few row to 27 columns. I want to find rows have 27 columns and then concatenate the specific columns to single column to make it 26 columns. Kindly help, Can... (3 Replies)
Discussion started by: sadique.manzar
3 Replies
s_grad_grad(3rheolef)						    rheolef-6.1 					     s_grad_grad(3rheolef)

NAME
s_grad_grad -- grad_grad-like operator for the Stokes stream function computation SYNOPSIS
form(const space V, const space& V, "s_grad_grad"); DESCRIPTION
Assembly the form associated to the -div(grad) variant operator on a finite element space V. The V space may be a either P1 or P2 finite element space. See also form(2) and space(2). On cartesian coordinate systems, the form coincide with the "grad_grad" one (see grad_grad(3)): / | a(u,v) = | grad(u).grad(v) dx | / Omega The stream function on tri-dimensionnal cartesian coordinate systems is such that u = curl psi div psi = 0 where u is the velocity field. Taking the curl of the first relation, using the identity: curl(curl(psi)) = -div(grad(psi)) + grad(div(psi)) and using the div(psi)=0 relation leads to: -div(grad(psi)) = curl(u) This relation leads to a variational formulation involving the the "grad_grad" and the "curl" forms (see grad_grad(3), curl(3)). In the axisymmetric case, the stream function psi is scalar ans is defined from the velocity field u=(ur,uz) by (see Batchelor, 6th ed., 1967, p 543): d psi d psi uz = (1/r) ----- and ur = - (1/r) ----- d r d r See also http://en.wikipedia.org/wiki/Stokes_stream_function . Multiplying by rot(xi)=(d xi/dr, -d xi/dz), and integrating with r dr dz, we get a well-posed variationnal problem: a(psi,xi) = b(xi,u) with / | (d psi d xi d psi d xi) a(psi,xi) = | (----- ---- + ----- ----) dr dz | ( d r d r d z d z ) / Omega and / | (d xi d xi ) b(xi,u) = | (---- ur - ---- uz) r dr dz | (d z d r ) / Omega Notice that a is symmetric definite positive, but without the 'r' weight as is is usual for axisymmetric standard forms. The b form is named "s_curl", for the Stokes curl variant of the "curl" operator (see s_curl(3)) as it is closely related to the "curl" operator, but differs by the r and 1/r factors, as: ( d (r xi) d xi ) curl(xi) = ( (1/r) -------- ; - -----) ( d r d z ) while ( d xi d xi ) s_curl(xi) = ( ---- ; - ---- ) ( d r d z ) EXAMPLE
The following piece of code build the form associated to the P1 approximation: geo g("square"); space V(g, "P1"); form a(V, V, "s_grad_grad"); SEE ALSO
form(2), space(2), grad_grad(3), grad_grad(3), curl(3), s_curl(3) rheolef-6.1 rheolef-6.1 s_grad_grad(3rheolef)
All times are GMT -4. The time now is 08:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy