SOLVED: Advanced shell scripting question :-)

2002-09-06 Thread Steven W. Orr

On Wed, 4 Sep 2002, Steven W. Orr wrote:

=I have a program (which we shall call p) which produces text to both 
=stdout and stderr.
=
=I want the following three things to happen when I run p:
=
=1. I want both stdout and stderr to go to the screen
=
=2. I want stdout and stderr combined in a file
=
=3. I want an error log file to only contain stderr.
=
=p 21 | tee outnerr # Solves 1 and 2
=
=p 2 errlog   # Solves 3 but breaks 1 and 2
=
=p 2 errlog | tee out # Solves 3 but also breaks 1 and 2.
=
=Any takers?
All kinds of fun games have been played, but I now have
GermanAccentZe Final Solution/GermanAccent.

{
p 21 3 3- | tee err
} 31 | tee out

[This was so elegant I almost cried when I saw it.]

But! This still suffers slightly from the buffering problem we were 
looking at that also turned out to be part of the problem. To fix that, I 
took a look at the unbuffer command which comes with the expect package. I 
modified it so it would not do the unbuffering that it was designed for. 
Instead, it now does straight line buffering.

(The line buffering was turned off by virtue of running through a pipe.)

Here is the new lbuffer command:

#!/usr/bin/expect --
eval spawn $argv
set timeout -1
expect

So the total solution is this:

{
lbuffer p 21 3 3- | tee err
} 31 | tee out

Thanks to everyone :-)

You may now talk amongst yourselves.

-- 
-Time flies like the wind. Fruit flies like a banana. Stranger things have -
-happened but none stranger than this. Does your driver's license say Organ
-Donor?Black holes are where God divided by zero. Listen to me! We are all-
-individuals! What if this weren't a hypothetical question? [EMAIL PROTECTED]

___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



Re: smallest pingable device

2002-09-06 Thread Hewitt Tech

Probably a Palm Pilot or Pocket PC. Certainly the Sharp Zaurus 5500 which
runs Linux would be able to do it. There is also something called a TinyPC
that's about the size of a matchbox would do it as well...

-Alex

P.S. If you're looking for something cheap, any of the DSL/Cable Modem
routers which are as low as $50 will answer a ping.
In fact I just pinged my LinkSys box and it answered nicely.

- Original Message -
From: Michael O'Donnell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 06, 2002 9:58 AM
Subject: smallest pingable device



 What's the smallest device I can connect
 to a 10/100 Enet that will answer pings?

 ___
 gnhlug-discuss mailing list
 [EMAIL PROTECTED]
 http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss


___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



Re: smallest pingable device

2002-09-06 Thread Matthew J. Brodeur

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 6 Sep 2002, Michael O'Donnell wrote:

 What's the smallest device I can connect
 to a 10/100 Enet that will answer pings?

   Maybe something like a micro print server?  Lantronix has some pretty 
tiny (1 x 2.3 x 3.3) ones:
http://www.lantronix.com/products/ps/mps/index.html

   They aren't particularly cheap when new, but can be found on eBay and 
the like.  The one that I have (MPS1) will talk to the network as long as 
it has power, regardless of whether it's attached to a printer.

- -- 
 -Matt

Support your local Search and Rescue unit -- get lost.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9eLiUc8/WFSz+GKMRAraXAKCCR7ulI3shy8/C3lw1VahAM3qRbgCeInf3
DFdYhJG8aI7xEzHDj/DWndE=
=5yhs
-END PGP SIGNATURE-

___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



Re: smallest pingable device

2002-09-06 Thread Ken Ambrose

There are some -really- small IP/ethernet-aware embedded devices; I know
that www.sensorsmag.com (located in lovely, scenic Peterborough) has
reviewed them from time to time.  Their new products editor, Melanie
Martella ([EMAIL PROTECTED]) could probably offer assistance
tracking them down, especially if it's for a commercial application.

-Ken

On Fri, 6 Sep 2002, Michael O'Donnell wrote:


 What's the smallest device I can connect
 to a 10/100 Enet that will answer pings?

 ___
 gnhlug-discuss mailing list
 [EMAIL PROTECTED]
 http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



Re: SOLVED: Advanced shell scripting question :-)

2002-09-06 Thread Bob Bell

On Fri, Sep 06, 2002 at 09:44:53AM -0400, Steven W. Orr [EMAIL PROTECTED] wrote:
 {
 p 21 3 3- | tee err
 } 31 | tee out
 
 [This was so elegant I almost cried when I saw it.]

What is the '3-' for?  I can't seem seem to find what '-' means,
plus it runs the same with or without this argument for me.

 {
 lbuffer p 21 3 3- | tee err
 } 31 | tee out

When I run this on my Tru64 box at work or on my Linux box at home
(which seems to be so underpowered that it doesn't have the
lines-out-of-order problem), I get an empty 'err' file.  Does this work
for everybody else?

BTW, Steven, you might want to consider changing 'spawn' to 'spawn
-noecho'.

I must say, though, the expect fakeout to get rid of buffering is
pretty cool...

-- 
Bob Bell [EMAIL PROTECTED]
-
 Everything that can be invented has been invented.
   -- Commissioner, US Office of Patents, 1889
___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



Re: Any VA reps still here?

2002-09-06 Thread Joshua S. Freeman

Paul,

I don't wanna speak for Charlie Bennett but I *will* speak for Ari Jort...
you can email him at [EMAIL PROTECTED]

tell him I sent you.

cheers,
j.



 -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   Joshua S. Freeman | preferred email: [EMAIL PROTECTED]  
   pgp public key: finger [EMAIL PROTECTED]
  http://www.threeofus.com
 -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



Re: smallest pingable device

2002-09-06 Thread Ben Boulanger

On Fri, 6 Sep 2002, Michael O'Donnell wrote:
 Thanks - that's the sort of thing I had in mind -
 anybody know of something smaller/cheaper/simpler?

This is something I've been interested in throwing together for awhile:

http://wearables.stanford.edu/hardware.html#pc

-- 

To put the world in order, we must first put the nation in order; to put the
nation in order, we must put the family in order; to put the family in
order, we must cultivate our personal life; and to cultivate our personal
life, we must first set our hearts right. 
  ~ Confucius

___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



Re: smallest pingable device

2002-09-06 Thread Tom Buskey


Hewitt Tech said:
Probably a Palm Pilot or Pocket PC. Certainly the Sharp Zaurus 5500 which
runs Linux would be able to do it. There is also something called a TinyPC
that's about the size of a matchbox would do it as well...

How about the uClinux group's (http://www.uclinux.org) hardware device?
It's a 1.7 inch by 2.7 inch soDIMM form factor with the dragonball m68k
cpu like the pilot on it with 8MB and a 10T connector. It runs uCLinux
(no MMU).


-Alex

P.S. If you're looking for something cheap, any of the DSL/Cable Modem
routers which are as low as $50 will answer a ping.
In fact I just pinged my LinkSys box and it answered nicely.

There are some managed hubs/switches out there too.



-- 
---
Tom Buskey


___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss