CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Extract mean in bash

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 2, 2022, 15:40
Default Extract mean in bash
  #1
New Member
 
Thomas
Join Date: Aug 2022
Posts: 1
Rep Power: 0
Thomthom is on a distinguished road
[QUOTE=Thomthom;832962]


Hello !!
I need some help I have tow lists
file1.txt

1 -30.133 Orange
1 -6.576 Banana
1 -6.293 Apple
1 -12.034 Apricot
1 -7.076 Blackberry
2 -4.355 Apple
2 -6.517 Banana
2 -6.355 Apricot
2 -3.502 Blackberry

and I have the means
file2.txt

1 -12.4224
2 -5.18225


For the groups, I would like to write : For the group 1, Apricot is the most near of the means and for the group 2, Apple is the most near of the means.

Last edited by Thomthom; August 2, 2022 at 18:24.
Thomthom is offline   Reply With Quote

Reply

Tags
bash script


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[OpenFOAM.org] Error in sourcing OpenFOAM 5.x WhiteW OpenFOAM Installation 14 April 18, 2018 21:00
[OpenFOAM.com] Issues with installing v1712 on MacOS Spacegirl1923 OpenFOAM Installation 8 April 12, 2018 17:44
[OpenFOAM.com] Installation of OpenFOAM 1.7.1 on Ubuntu 16.04 MM_Khan OpenFOAM Installation 11 September 3, 2017 09:22
How to install OF DP and SP in parallel? klausb OpenFOAM Installation 6 January 7, 2012 18:40


All times are GMT -4. The time now is 03:14.