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...
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...
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?
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"{...
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...
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...
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...
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...
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...
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...
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...
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.