Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: rhnaeco
  • Content: Threads
  • Order by date
  1. rhnaeco

    alert if email not received in outlook

    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...
  2. rhnaeco

    unchangable low resolution

    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...
  3. rhnaeco

    use column as variable

    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...
  4. rhnaeco

    Substitute Line

    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...
  5. rhnaeco

    excel function 'if true'

    Hi all, this is my data: Range From To Sunrise Sunset 0.8 03:24 08:38 03:34:00 20:54:00 1 08:38 15:15 03:34:00 20:54:00 1.1 15:15 21:26 03:34:00 20:54:00 0.8 21:26 04:10 03:34:00 20:54:00 0.7 04:10 09:26 03:36:00 20:52:00 yes 0.9 09:26 16:06 03:36:00 20:52:00 0.9 16:06 22:18 03:36:00...
  6. rhnaeco

    average block of data

    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...
  7. rhnaeco

    calculate mode/ most common value

    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
  8. rhnaeco

    if statement using arrays

    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...
  9. rhnaeco

    find string and print preceeding and following lines

    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...
  10. rhnaeco

    averaging column

    Hi, I have a data file which looks like this: 12.44342 45.42285 -6.63031 49170 243 159.083 12.44332 45.4228 -6.66277 49180 105 142.417 12.44315 45.42279 -6.66277 49190 255 133.25 12.44297 45.42279 -6.64404 49200 120 109.25 12.4428 45.42277 -6.66027 49210 231 103.583 12.44263 45.42272 -6.64404...
  11. rhnaeco

    print next line

    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...
  12. rhnaeco

    line by line subraction

    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 =...
  13. rhnaeco

    arrays and getline

    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...
  14. rhnaeco

    where is the missing third of my postscript image???

    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...
  15. rhnaeco

    compare fields and print to separate file

    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...
  16. rhnaeco

    delete line if no data in all columns?

    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...
  17. rhnaeco

    remove lines

    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...
  18. rhnaeco

    print to a separate terminal screen

    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...
  19. rhnaeco

    create blank file

    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...
  20. rhnaeco

    awk for loops and variables

    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...

Part and Inventory Search

Back
Top