Search Results

Search: Posts Made By: ezitoc
3,846
Posted By frewise
sum the columns of files
I have several csv files like this:
file1.csv
1 12 1
2 8 9
3 9 2
4 5 9
...
file2.csv
1 0 1
2 2 3
3 4 1
...
file3.csv
1 0 1
2 4 ...
2,650
Posted By chihung
#! /bin/sh awk ' BEGIN { delta=0.2 ...
#! /bin/sh

awk '
BEGIN {
delta=0.2

# process first line
getline
value=$2
print
}
{
if ( $2-value > delta ) {
print
value=$2
}
}' input
6,641
Posted By turk451
May work for you: find ~/modeling* -name...
May work for you:


find ~/modeling* -name "*.log"|xargs -ix bash -c "tac x|grep -m 3 -e ITER"
1,367
Posted By bartus11
Try: awk 'NR>5&&NR<9{$2+=0.1}1' file
Try: awk 'NR>5&&NR<9{$2+=0.1}1' file
4,848
Posted By vgersh99
de=$(echo "$scale;($e2)-($e1)" | bc -l)
de=$(echo "$scale;($e2)-($e1)" | bc -l)
8,009
Posted By Scrutinizer
I would do something like this: awk 'NR==FNR {...
I would do something like this:
awk 'NR==FNR {
for(i=1;i<=NF;i++)A[NR,i]=$i
next
}
{
for(i=1;i<=NF;i++){
t=0
for(j=1;j<=NF;j++)
...
Showing results 1 to 6 of 6

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