Hey! That units program is cool! Thanks Bob!
Like Rob's call for cool command line tricks, I'd like to make a similar call for
other programs like units. What programs are hidden within the depths of *nix that
some of you old unix gurus know about?
Here's some that I think are very useful:
Most people know:
cat - type a file to standard out
less - type a file to standard out with paging (pauses at full screen)
more - same
grep - search a file for a pattern
diff - find differences of files
... many more
Some people might not know about their compressed counterparts:
zcat - type a compressed file to standard out (uncompress it first)
zless - page a compressed file
zmore - same
zgrep - search a compressed file for a pattern (all these uncompress the file)
zdiff - find differences of compressed files
z... zmany zmore... ;)
Cory
On Sat, Feb 03, 2001 at 07:59:31AM -0800, Bob Miller wrote:
> James S. Kaplan wrote:
>
> > How do you calculate this?
>
> Like this.
>
> You have to traverse the 22400 mile link from earth to satellite four
> times. Ping request goes up, request comes down, reply goes up, reply
> goes down.
>
> 4 * 22400 mile
> --------------- = 0.480 seconds
> 186000 mile/sec
>
> I pulled the 22400 mile altitude off Starband's site, and got the
> speed of light from /usr/bin/units.*
>
> > At Seiko, we had ping times of half that, going from wan to uplink
> > to NOC using 64kbps frame relay.
>
> Did this include two round trips to the bird?
>
> --------
>
> * Does everybody know about units? Ancient program, very cool
> Just now I wanted the speed of light in miles/second. I typed
> this.
>
> % units
> 501 units, 41 prefixes
>
> You have: c
> You want: mile/second
> * 186282.4 <--- that's the answer
> / 5.3681938e-06
> You have: ^D
> %
>
> I could have done the whole problem using it, like so.
>
> You have: 4 * 22400 * mile
> You want: sec * c
> * 0.48099016 <--- that's the answer
> / 2.0790446
>
> It's good for all those freshman physics type problems where
> once you match the dimensions, you have the right formula.
>
> --
> K<bob>
> [EMAIL PROTECTED], http://www.jogger-egg.com/