On 7/4/06, Eben King <eben01@verizon.net> wrote:
> On Tue, 4 Jul 2006, Chuck Hast wrote:
>
> > On 7/4/06, Eben King <eben01@verizon.net> wrote:
> >> On Tue, 4 Jul 2006, Chuck Hast wrote:
> >>
> >> > I need to be able to send text out for a simple help system. What I need
> >> > is something that will read text down to some sort of break symbol or
> >> > group of symbols and then stop, prompt the user for a carrage return or
> >> > space or some other control character in order to send more text.
> >>
> >> Try this:
> >>
> >> #! /bin/bash
> >>
> >> textfile="$1"
> >> prompt="Press enter to continue: "
> >> my_tty=`tty`
> >>
> >> while read line ; do
> >> if echo "$line" | grep -q -e '^-$' ; then
> >> read -p "$prompt" junk < $my_tty
> >> echo
> >> else
> >> echo "$line"
> >> fi
> >> done < "$textfile"
> >
> > Well, I thought it was going to work but then as soon as I did the test
> > where I connected to the system from a distant location I got the same
> > thing the whole file is dumped to me.
>
> Huh. That's a failure mode I hadn't anticipated. Is it printing the prompt
> at appropriate places? What file are you using to test it?
>
> --
Here is what it looks like when I am on the console of the machine that I am
working on
This is just the first piece up to the break:
===========begin dump ============
KP4DJT-8 (Commands = ?) : 411
411 Info for 813 area
The 813 area presently consist of the following operational Switches:
KC5QCN:
Located on the County Building in downtown Tampa at about 350ft. agl.
Node call:
KC5QCN-8.
Level 3 call:
KC5QCN-9.
X.121 Address 813224.
OS and ver:
DOS FPAC ver DWJ-2.0r6-C.
Facilities:
None, DOS based.
Administrator:
TPALAN.
NOTES:
TPALAN is in the process of gathering equipment to convert this switch
to FPAC Linux.
Press enter to continue:
==============end of dump ===============
Now I will show you a partial screen of the same file when requested as
though I was a remote user on the network trying to get info on that part-
cular switch, in this case I have connected to a switch in Paris, France
and then issued a connect back to the test switch. Once at the command
prompt I type the 411 command and get the whole file dumped I will send
you the upper part of the file along with the link setup info:
F6BVP-10 (Commands = ?) : usa
Trying KP4DJT-8 @ 3100,813626... Type <RETURN> to abort
*** Connected to KP4DJT-8 @ 3100,813626 (Escape: ~. )
FPAC-Node v 3.26 (F6FBB - Dec 18 2002) for LINUX (help = h)
KP4DJT-8 (Commands = ?) : 411
411 Info for 813 area
The 813 area presently consist of the following operational Switches:
KC5QCN:
Located on the County Building in downtown Tampa at about 350ft. agl.
Node call:
KC5QCN-8.
Level 3 call:
KC5QCN-9.
X.121 Address 813224.
OS and ver:
DOS FPAC ver DWJ-2.0r6-C.
Facilities:
None, DOS based.
Administrator:
TPALAN.
NOTES:
TPALAN is in the process of gathering equipment to convert this switch
to FPAC Linux.
KP4DJT
Located in Palm River, this is a test switch so facilites may change
Node call:
KP4DJT-8
========== end dump ============
There should have been a prompt between Linux and KP4DJT, but there
is nothing and it just dumps the whole thing.
-- Chuck Hast -- KP4DJT -- To paraphrase my flight instructor; "the only dumb question is the one you DID NOT ask resulting in my going out and having to identify your bits and pieces in the midst of torn and twisted metal." ----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:33:49 EDT