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 strongm 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: tini1208
  • Content: Threads
  • Order by date
  1. tini1208

    from gawk to nawk

    dear all, i've got a code, written in awk. it also worked in gawk, but now i only have the nawk available and it doesn't work anylonger. so...here is the code: awk '(x-$1)*((x>$1)+(-1*(x<$1)))>2{++f}\{print>"outfile"f;x=$1}' infile this code searches for differences in the first column...
  2. tini1208

    UTC time in strftime

    hi all, i am using strftime to convert UTC seconds to a time format, but strftime uses the local system time (in my case gmt+1....summer and wintertime). my current code is: OFS="\t"; print $3, strftime("%Y\t%m\t%d\t%H\t%M\t%S",time), lon, lat, ele it there a possibility to use UTC time...
  3. tini1208

    strftime utc seconds starting from 1 Jan 2000 12:00

    hi all, i use strftime for converting seconds in date and time, but the strftime counts from 1 Jan 1970 00:00. Is there a command using UTC seconds starting from noon 1 Jan 2000? my commands look like this: print strftime("%Y\t%m\t%d\t%H\t%M\t%S",$1) where $1 = seconds. can anybody help me?
  4. tini1208

    more than one input and output file

    hi all, it every time the same problem i have and i hope to find the solution here. my script file: BEGIN {print "UTC shot_time ID lat lon ele ocElev oc_load sat_corr sat_corr_flg sigma_elev" } $1 == "i_UTCTime"{ for(i=0; i<40; i++){ UTC[i]=$3} } $1 == "i_dShotTime"{...
  5. tini1208

    convert dayseconds in time of day

    hi all, i've got a problem with the conversion of dayseconds to time of day. i've converted the time of day 12:02:45 (hh:mm:ss) with: gawk '{split ($3, time, ":") t_sec = time[1]*3600+time[2]*60+time[3]}'\ input > output this works very well but what about the other way around? i...
  6. tini1208

    grep every even line

    hi all, i don't know, if it is possible, but i want to extract every even line from a big file. the file looks like this: lon lat height 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 now, i want to extract line 2, 4, 6 etc. is this...
  7. tini1208

    gawk and ubuntu

    hi all, i have a big problem with my gawk. the programm is installed, i guess, because it works, when i'm using command line gawk. now, i want to process more than one file in the same way and therefor, i want to write a script file. the script looks like: #! /usr/bin/gawk -f set infile (i...
  8. tini1208

    calculating the mean of a column

    hi everybody, is there a short command, to caculate the mean of a column? thanks, tini
  9. tini1208

    split one file into several parts

    hi all, my files look like this: 19.989182 -82.379220 19.983025 -82.377908 19.976869 -82.376596 19.970714 -82.375284 19.964563 -82.373970 19.958413 -82.372655 19.952262 -82.371340 19.946107...
  10. tini1208

    readout data into a new file

    hi at all, now, i have a new problem and started to write a script, but there is an error and i don't where. the file looks like this: i_lat = 214748 214748 214748 214748 214748 214748 214748 214748 214748 214748 214748 214748 214748 214748 214748 214748 214748 214748 214748...
  11. tini1208

    comparison of values in back-to-back lines

    hi, i have following problem. my file looks like this (it's only a part, most of the files have several tausend rows): 19.996091 -85.413194 2686.192 19.979215 -85.413961 2686.585 19.962339 -85.414726 2686.863 19.945468 -85.415490 2686.914...
  12. tini1208

    joining of two files

    hi all, i'm trying to join two files. first file looks like: time longitude latitude height 37786 -8.263067522 -70.642653907 53.916 37816 -8.263069117 -70.642653804 53.738 37846 -8.262415414 -70.642604397 53.503 37876 -8.262414702 -70.642604411 53.529...
  13. tini1208

    extract from file

    hi all, i want to extract several lines (the lines are more than one time in the file) from a file. the input looks like: i_AttFlg1 = 16 16 16 16 i_lat = 50764695 50826421 50888144 50949866 i_lon = 95795766 95780813 95765832...

Part and Inventory Search

Back
Top