Hi,
I have a file like this:
.....
10801 0.0 14.1 1.09083 0.00744552 0.00142242 0.0201911
10802 0.10 14.08 1.06125 0.00697322 0.00133229 0.0201911
10803....
$1 is an length coordinate, and I would like to create a depth coordinate as $2 so that i have a depth every 10 cm for 1 metre and...
I know this question has been put before, but in a more simplistic way, like averaging $1 every 5 rows.
I would like to know how to average out a column when $1 has the same number ( but there is not equal amounts of numbers in $1). e.g.
635 -1.47 0 62.125 8.835 7.365 5.5
635 -1.97 1.91877...
Hi, I have two files. E.g:
file a: 486 -1.47 38.1073
file b: 486 -1.97 34.7981 -3.35
and this is my script so far:
awk '
BEGIN {
while (getline < "file b") {
count[$1]=$2
}
}
{
if (count[$1])
print $1, $2*-1, $3, count[$1]*-1}' file a > out
I also want to...
Hi, is it possible find the maximum depth in $2 for every different value in $1(a coordinate)?. The depth in the file ranges to a maximum of around -14 and always starts at -1.47. $4 is "actual" depth
486 -1.47 1.83712 -3.35
486 -1.97 1.67761 -3.35
486 -2.47 1.4363 -3.35
486 -2.97 2.89847 -3.35...
I'm hoping this is a simple question:
my script:
x="B1"
if [ "$x" = B* ]; then
echo B
else
echo M
fi
this doesn't work but hopefully you can see what i want to do - how do i get the if loop to recognize that the input contains the letter 'b' with out having to do:
if [ x = 1 ] || [ x = 2 ]...
Hi, I am trying to smooth out some data. I have a long file formatted with position and signal strength:
22.38762 55.43485 107.333
22.3878 55.43485 94.0333
22.38797 55.43487 83.1333
22.38875 55.435 86.2666
22.38895 55.435 93.2999
I want to go through each line and find all other records in the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.