Hey gang, I have a list of times I need to sum up. This list can vary from a few to a few thousand entries. Now I had found a closed reference to adding time titled "add up time with xx:yy format in bash how?" In it, the example works great for that formatted list of times... This is the reply code from user AGAMA in that thread:
"
BUT what I'm getting hung up on is how would I introduce the third parameter of seconds to this, if my times had the three columns?
I'm not quite verse enough in scripting to understand the formatting of the read in the 'do' loop. Are the '%' and '#' arbitrary or necessary for what they're representing?
In the other thread Agama tries to explain parameter expansion in a latter reply, but try as I may, I'm not wrapping my shrunken brain around this. I do need a bit of assistance trying to figure it out and adding in the seconds to tally up.
Hello everyone and let me start off by thanking anyone who can help with this.
I work for a company that uses Unix as one of their servers. I'm not at all familar with Unix beyond logging after I restart the server:rolleyes: I'm looking for some command that will bring me up a list of current... (3 Replies)
Hi all,
I have a list of times:
...10:02
15:34
20:05
01:51
06:55
09:00
05:52...
That's just part of the list (its huge).
How do I go about selecting certain times, e.g. just between 23:00 and 05:00 ?? (4 Replies)
i have a list of numbers like this;
124
235
764
782
765
451
983
909
...
and i want to make a sum with the first 3 of them then the next 3 and so on.
124+235+764=1123
782+765+451=1998
...
some ideas? (4 Replies)
Hi Experts,
I want to add 20% to the values and get an output , please advise with script , awk etc,
# cat datafile.txt
50.4053
278.383
258.164
198.743
4657.66
12.7441
646.787
1.56836
23.2969
191.805
53.3096
1.12988
999.058
4100.29 (2 Replies)
If I had a word list with a large amount of words in it, how would I (using a unix command) add, say, 123 to the end of each word?
EDIT: The word list is stored in a large text file. I need a command that applies the ending to each word in the file and saves the result in a new text file. (7 Replies)
Hello,
i'm trying to implement the times() function and i'm programming in C.
I'm using the "struct tms" structure which consists of the fields:
The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process.
The tms_stime structure... (1 Reply)
I'm having some troubles setting an instance of postgreSQL to automatically start upon system boot. I have two servers running this app, one is automatically starting the service, the other is not. I'm attempting to use the "svcadmin" command, however, apparently when I run a "svcs -a" search, the... (6 Replies)
Hi All,
I have a file with long list of numbers. This file contains only one column. These numbers are very large. I am using following command:
cat myfile.txt | awk '{ sum+=$1} END {print sum}'
The output is coming in scientific notation. How do I get the result in proper format?
... (4 Replies)
Discussion started by: angshuman
4 Replies
LEARN ABOUT PLAN9
astro
ASTRO(7) Miscellaneous Information Manual ASTRO(7)NAME
astro - print astronomical information
SYNOPSIS
astro [ -dlepsatokm ] [ -cn ]
DESCRIPTION
Astro reports upcoming celestial events, by default for 24 hours starting now. The options are:
d Read the starting date. A prompt gives the input format.
l Read the north latitude, west longitude, and elevation of the observation point. A prompt gives the input format. If l is missing,
the initial position is read from the file /lib/sky/here.
c Report for n (default 1) successive days.
e Report fractional overlap during eclipses.
p Print the positions of objects at the given time rather than searching for interesting conjunctions. For each, the name is followed
by the right ascension (hours, minutes, seconds), declination (degrees, minutes, seconds), azimuth (degrees), elevation (degrees),
and semidiameter (arc minutes). For the sun and moon, the magnitude is also printed.
s Print output in English words suitable for speech synthesizers.
a Include a list of artificial earth satellites for interesting events. (There are no orbital elements for the satellites, so this
option is not usable.)
t Read /T from standard input. /T is the difference between ephemeris and universal time (seconds) due to the slowing of the
earth's rotation. /T is normally calculated from an empirical formula. This option is needed only for very accurate timing of
occultations, eclipses, etc.
o Search for stellar occultations.
k Print times in local time (`kitchen clock') as described in the timezone environment variable.
m Includes a single comet in the list of objects. This is modified (in the source) to refer to an approaching comet but in steady
state usually refers to the last interesting comet (currently Levy, 1990c).
FILES
/lib/sky/estartab
ecliptic star data
/lib/sky/here
default latitude (N), longitude (W), and elevation (meters)
SOURCE
/sys/src/cmd/astro
SEE ALSO scat(7)BUGS
The k option reverts to GMT outside of 1970-2036.
ASTRO(7)