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
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...
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) \...
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 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...
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"{...
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)...
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 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!
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...
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!
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...
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.