Hi,
not sure where the right place is for this post but if anyone has any ideas then please share :)
I have a matlab script that runs daily and sends an email to show the results (the position of a buoy in the sea). If the matlab script fails - this is recorded in the email, however, if the...
Hi,
Fedup of waiting half an hour for my dell mobile workstation to load up i removed some unused programs from the startup options in msconfig. When it restarted it came up with the usual ms panic and very low resolution. I couldn't change the resolution so i just went back to the normal...
Hi, I have columns of data which are measurements of current flow in the water column. The instrument returns data from above the water column, which is data I want to remove (retain only data in the water, not any noise).
my datafile (headers):
ensemble, depth, 1, 2, 3, 4,... 34, 35, 36, 37...
I have lots of files with several hundred rows and columns.
I would like to substitute one line and keep the others as is. For that line I would like to add 0.8 to each column
input:
a,s,d,f,g,h
1,2,3,4,5,6
ed,rf,hg,rt,fg,kj
output:
a,s,d,f,g,h
1.8,2.8,3.8,4.8,5.8,6.8
ed,rf,hg,rt,fg,kj
but...
Hi,
I have a file of burst data - i.e. data exists every 0.5 seconds for 1 minute, and then there is a 15 minute gap (approx) before any more data is printed.
Can awk average the data (multiple columns) for each burst and print the line of averaged data to a new file?
Input:
23/11/2008...
Hi, does anybody know how to calculate the mode using awk or sed?
I have a 3 column file and i need to find the most common value in the 3rd column.
thanks in advance
rhnaceo
Hi, i need a bit of help sorting out my script:
awk '
BEGIN {
while (getline < "file1") {
cnt[$1]=$1
dep[$1]=$2
}
}
{
if (cnt[$1] = $1)
if ((dep[$1] < $2+0.4) && (dep[$1] > $2-0.4))
print $1, $2, dep[$1], $3, $4
}' file2 > file3
lines from file1:
486 -0.35...
hi, i have a data set of sonar pings. Each record consists of several lines of associate data such as depth and position and followed by 30 lines of actual data, followed by the next record.
normally i would say something like ' if $1 = "line1" then print next 30 lines' and then sort it out...
Hi,
I have a data file like this ($1 being the line number)
32....
33,8,8,8,8,8,8,8,8,8,8,8,8,8,8,245,230,120....
34,8,8,8,8,8,8,8,8,8,8,8,8,8,8,210,90,45....
35,200,200,200,200,200,200,200,200,105,214....
36....
what i want is for awk to:
if ($2 == "200") print next line only.
i have several...
I'm not sure whether this is a sed or awk solution:
i have a file like this :
12.4277 -12.9941
12.4277 -13.2078
12.4278 -13.3616
12.4278 -13.3616
.... .... ....
i would like to subract the values in $3 from each other, e.g.
-13.2078 - -12.9941 = column in new file
-13.3616 - -13.2078 =...
i know this is easy and i should use arrays- however despite reading about them i still don't quite understand:
i have two files one containing:
1 Tidal Prism = 1.20397e+08 m2
the other:
1 profile area = 12309.8 m2
2 profile length = 1.06403 km
all i want to do is create a file like this...
Can anyone tell me why, when i produce a landscape image using GMT, postscript viewers (ggv and gv) cut off part of the image? (always the right hand ~third). I know the image is complete as conversion to pdf always shows the complete image. Portrait images are no problem and i have the default...
I have two files both with a structure like
12.7244 45.4828 -16.099
12.7249 45.4985 -12.45
12.7253 45.4888 -14.797
12.7257 45.5045 -11.79
12.7261 45.4948 -13.767
12.7265 45.4851 -15.631
I would like awk/sed to search the lines of one file and if $1 and $2 match with $1 and $2 in the other...
hi, I have a file which has been been created by a series of awk and sed commands which should have 4 columns.
unfortunately some lines have some data missing and thus only have 2 or 3 columns.
the subsequent running of a fortran script doesn't like this change and it exits.
so far i have...
I'm sure this has been answered before but i can only find answers for removing blank lines.
I would like to remove $n number of lines from the end of a file and $n number of lines from the beginning of the same file.
i.e remove 5 lines from the beginning and 2 from the end of the file.
I...
hi, i have a very long BASH shell script which runs through quite quickly.
I want to see the results of part of the script as it is running- i have been doing this through nedit so far, but as i increase the number of input files i have so many nedits open i can't see the results anyway!!
i then...
i know this may seem like an obvious question, but i am trying to create a blank text file from the command line (so that it doen't open), because i want to send continuous data into it from a loop ( i.e the first command is >> file.dat.
at the moment i am using :
$ echo > file.dat
which...
hi, i have a series of files like this one:
D22 L58 two
O12 L58 two
Z5 L58 two
Z19 L58 two
and i want to make the first column into a variable ($var) that will be used in the rest of the shell script
This is my awk script so far :
awk '{
for (i = 1; i <= 1; i++)
print "var="$i
}' L58vector.txt...
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.