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 IamaSherpa 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: *

  1. tini1208

    from gawk to nawk

    PHV...you are great!!! thanks for the very fast answer!
  2. tini1208

    from gawk to nawk

    dear all, i am using the code above and i am wondering, why the code abords after the creation of 60 files. is there a maxiumum number of files, which can be created during one cycle? regards, tini
  3. tini1208

    from gawk to nawk

    thanks to PHV!!!!
  4. 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...
  5. tini1208

    UTC time in strftime

    YES!!!! Thanks a lot!!!
  6. tini1208

    UTC time in strftime

    thanks phv, but....mmmhhhhh.....i think it's more understandable, when i post the complete code. i am always using tcsh....force of habit. #! /bin/tcsh -f foreach i (`ls *.out`) echo $i set outfile = $i:r.1b gawk '{if(NF==10) \...
  7. 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...
  8. tini1208

    strftime utc seconds starting from 1 Jan 2000 12:00

    sorry...my e-key clamps sometimes!! ;-)
  9. tini1208

    strftime utc seconds starting from 1 Jan 2000 12:00

    hi fherke, yes...i did this, but i thought there are an onther possibility. but thanks for your tip!!! cheers, tini
  10. 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?
  11. tini1208

    more than one input and output file

    hi feherke, thanks for your answer!! i have a plenty of files and that's why a try to use only one command. yes...my code is not short...and it's only a part of it ;-). another maybe stupid question: is the code at the beginning of the script or at the end? i am a bit confused of this...
  12. 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"{...
  13. tini1208

    convert dayseconds in time of day

    hi phv and p5wizard, thank a lot for your good answers. i found the missing comma, when phv send the answer. bye....
  14. tini1208

    convert dayseconds in time of day

    thanks a lot for your answers. i tried this #! /bin/csh -f #GPS Tagessekunde in Uhrzeit set input = infile echo $input set output = outfile echo $output gawk '{h = int($1/3600) \ m = int(($1-3600*h)/60)...
  15. 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...
  16. tini1208

    grep every even line

    yes!!! awk '!(NR%2)' works very well! thank you!
  17. tini1208

    grep every even line

    hi p5wizard thank a lot for our answer. the command awk '!NR%2' infile does not work, error: NR: Event not found but the second command works very well!!!! thank a lot!
  18. 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...
  19. tini1208

    gawk and ubuntu

    yes...thanks a lot!!! my script looks like this: #! /bin/csh -f foreach i (`ls *txt`) echo $i set outfile = $i:r.diff awk'{printf"%10.6f\t%10.6f\t%10.3f\t%10.3f\t%10.3f\t%10.3f\n", \ $1, $2, $3, $4, $5, sqrt($5*$5)}' $i > $outfile end and it works very very well!!!!!!!! thanks!
  20. tini1208

    gawk and ubuntu

    sorry..i send the massage tooooo early. what about this: #BEGIN {printf"%10.6f\t%10.6f\t%10.3f\t%10.3f\t%10.3f\t%10.3f\n", \ $1, $2, $3, $4, $5, sqrt($5*$5)}# but my problem is still....how can i process more than one file...like a batch! where must i set the infile and outfile? i...

Part and Inventory Search

Back
Top