Search Results

Search: Posts Made By: bjoern456
5,629
Posted By bjoern456
I am using the terminal in openSuse 12.3 and ls...
I am using the terminal in openSuse 12.3 and ls -v lists the files in a numerical way like this: (1,2,3,..,10,11,..,100).

Thank you guys, now it works! I lost the "fi" and $i was allready the name...
5,629
Posted By bjoern456
[Solved] Check if file is empty with variables, bash
Hello again!

I have some trouble with scripting in bash.
In the following script I read from a folder with the files


line0_Ux.xy
line1_Ux.xy
line2_Ux.xy
.
.
.


Some of the files...
10,639
Posted By bjoern456
Lists in awk
Hi togehter!

I would like to write an awk script which prints the first column divided by the sum of the second column:

So if this is my list


1 2
2 1
3 1
4 1
it should print a list...
1,431
Posted By bjoern456
Thank you rdrtx1! That is was what im searchin...
Thank you rdrtx1!
That is was what im searchin for.
You were right I lost the denominator.
The (c - a) term is a significance.:b:
1,431
Posted By bjoern456
Specific values from a list, awk
Hello together!

I have a list like this

1 3
2 5
3 7
4 2
Now I want to take the average of the second column and multiply it by the difference of the first and last value of the first...
7,345
Posted By bjoern456
That works very good, thank you Yoda!:b: To...
That works very good, thank you Yoda!:b:
To give you an impression, the list is a sample of a cfd simulation.
So I get the x , y -components of the profile and the velocity.
Now I can compute the...
7,345
Posted By bjoern456
Thanks a lot to all of you! Especially Yodas...
Thanks a lot to all of you!
Especially Yodas post helps me out.
My script now looks like that:


awk '
{
s[$1]+=$3;n[$1]++
if ( $1 in L )
{
L[$1] = L[$1] > $2 ? $2 : L[$1]
H[$1] = H[$1] <...
7,345
Posted By bjoern456
@DGPickett: Do you mean something like this: ...
@DGPickett:
Do you mean something like this:

awk' {min[$1]=$2 , max[$1]=$2
if ($2 >= max) max=$2
else if ($2 <= min) min = $2}
END {for (x in min) print x, min[x], max[x]}...
7,345
Posted By bjoern456
Awk, highest and lowest value of a column
Hi again!
I am still impressed how fast I get a solution for my topic "average specific column value awk" yesterday.
The associative arrays in awk work fine for me!
But now I have another question...
1,794
Posted By bjoern456
Thanks a lot bartus11!:b:
Thanks a lot bartus11!:b:
1,794
Posted By bjoern456
Average by specific column value, awk
Hi,
I am searching for an awk-script that computes the mean values for the $2 column, but addicted to the values in the $1 column. It also should delete the unnecessary lines after computing...

...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 07:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy