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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by rhnaeco

  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

    hehe - no. Thanks PHV. i'm SO rusty with awk!
  4. rhnaeco

    use column as variable

    Thanks PHV, but i still can't get it to work. My layout is slightly different now (bin, ensemble, data....) so i've used: for(i=1;i<=(1+$1);++i)printf "%s,",$i;print $(2+$1) but all i get is extra blank space at the end and nothing removed. Can you offer further help? I've included the first...
  5. 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...
  6. rhnaeco

    Substitute Line

    thank you! works great
  7. 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...
  8. 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...
  9. rhnaeco

    average block of data

    I haven't a clue really! I haven't used awk for a couple of years and so I am almost back to square one. I am currently trying to use the approach of converting the date and time into a number and then using a similar code to http://www.tek-tips.com/viewthread.cfm?qid=1329515 any ideas would be...
  10. 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...
  11. rhnaeco

    calculate mode/ most common value

    Thank you vlad, most apprieciated. rhnaeco
  12. rhnaeco

    calculate mode/ most common value

    example file: a b 2 a b 2 a b 6 a b 2 a b 4 a b 2 a b 1 output: mode=2
  13. 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
  14. rhnaeco

    if statement using arrays

    thank you Annihilannic i found another way around this, but any help learning this program is always useful! only if you have the time... thanks again rhnaeco
  15. 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...

Part and Inventory Search

Back
Top