Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Apr 1997 21:43:37 -0700 (PDT)
From:      Kevin Eliuk <cagey@kevin.sunshine.net>
To:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc:        FreeBSD-Hackers <freebsd-hackers@FreeBSD.org>
Subject:   Re: "learn" unix tool
Message-ID:  <Pine.BSF.3.95q.970426211154.172E-100000@kevin.sunshine.net>
In-Reply-To: <19970426112516.ND36678@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 26 Apr 1997, J Wunsch wrote:

> As Kevin Eliuk wrote:
> 
> > > If you promise to write and maintain the texts, i promise to write you
> > > the user interface. :)
> > > 
> > I am willing to offer my support on the texts level. Being a newbie to
> > FreeBSD coming from dos could be an asset.
> 
> Great!
> 
> I suggest you could collect a few more volunteers, write at the
> FreeBSD hackers list.

If anyone see's any shortfalls with what I've done thus far hop on in with
contributions or corrections :]

Hopefully some multi-linguals could come up with translation for any final
drafts :-? (our Prime Ministers happy face -- get it)

Included is what I came up with as a starting format for "FreeBSD Learn"
Joerg.

I've marked the lines <del> ... </del> that I've written replacements
for to stick to your format. I also took some liberties in anticipating
future files.

---------------------------cut here-------------------------------------------
The available courses are:
  files
  editor
  morefiles
  macros
  eqn
  C
To get more course information,
or if you are using the learn command for the first time,
press the Enter key.  Otherwise type the name of
the course you want, and press the Enter key.
<inp>files</inp>
Press the Enter key to start at the beginning of the lesson,
or specify a lesson number to go directly to a different lesson.
A key word can be used in place of the lesson number.
When a key word is used, the learn command will begin at the first lesson
which contains that word.
<inp>
</inp>
This course will help you learn about basic file handling commands.
First you should understand how to give an answer that learn requests.

The most important thing to remember is that whenever you type a
command to UNIX or a response to "learn", you must press the
RETURN key or the system won't see your typing.

Sometimes learn asks you to come up with the right answer,
and then enter "answer", followed immediately by a space and the
single word which answers the question (and then RETURN).
This means that you would enter "answer WORD", where instead of
typing WORD you would type the word that is the correct answer.

For example, if the answer to a question were "bug", you would enter

answer bug

Type that in now, and don't forget to hit RETURN at the end of
the line.  Don't use any quotation marks in your response.
% <inp><CR></inp>
% <inp>answer bug</inp>

Good. The 0.01a lesson is complete.

Now you should understand the special characters del and ^U:

   del    cancels the previous character typed (delete or rubout)
   ^U     cancels the line being typed and puts you on a new line
                (called control-u)

These are the default characters used by the system.  Commonly,
del is replaced ^H (or backspace).

^U is typed by holding down the CTRL (for control) key and pressing
the letter 'u'.  The reason that there are the two characters
'^' and 'U' to represent one special character is that ^U usually
will not print on the screen.

If you make a typing mistake, you can use del and ^U to correct it
before you finish the line and the computer won't ever know about it.
For example, what will the computer really receive if you type assuming
^H is used instead of del

st^Hhe^Uthf^He

at it?  Figure this out in your head and reply "answer WORD" where
WORD is the word as it will be interpreted, and don't forget RETURN.
For example, if you think it will get "dog", type

answer dog

% <inp>answer dog</inp>

That is not correct.  Do you want to try again?  
        Press y for yes or n for no.  <inp>y</inp>
Please type yes, no, or bye:  <inp>yes</inp>
Please type yes, no, or bye:  <inp>ja</inp>
Try the problem again.
To read the lesson again, type the following: again
To exit from learn at any time, type the following: bye
% <inp>again</inp>
Now you should understand the special characters del and ^U:

[...]

% <inp>answer the</inp>

Good. The 0.1a lesson is complete.

You should also understand a few simple commands.
When UNIX types a "%" at you, you can type a command.
For example, if you type "date" the computer will tell
you the current date and time. If you see "%" and type "who",
UNIX will tell you who is logged on at present.  There are
many other commands, too.  You must type a RETURN at the
end of each command line.

Try the "date" command now: find out what
date it is, and after the computer has responded, type "ready".
And don't forget the RETURN!
% <inp>date</inp>
Sa 26 Apr 11:16:05 1997
% <inp>bye</inp>


As you can see, AIX is half-internationalized. :)  It prompts me to
answer `y' for yes, but actually expected `j' (for the German `ja').

Anyway, here's the files that accomplished the above.

Ey, interesting!  The files are copyrighted by the UCB!  Hmm, i wonder
whether we can find this anywhere...

---file L0---
#
#  COMPONENT_NAME: (CMDMAN) commands that allow users to read online 
#                  documentation
# 
#  FUNCTIONS: 
# 
#  ORIGINS: 27
# 
#  Copyright (c) 1980 Regents of the University of California.
#  All rights reserved.  The Berkeley software License Agreement
#  specifies the terms and conditions for redistribution.
# 

#next
0.01a 10

---file L0.01a---
#
#  COMPONENT_NAME: (CMDMAN) commands that allow users to read online 
#                  documentation
# 
#  FUNCTIONS: 
# 
#  ORIGINS: 27
# 
#  Copyright (c) 1980 Regents of the University of California.
#  All rights reserved.  The Berkeley software License Agreement
#  specifies the terms and conditions for redistribution.
# 

#print
<del>This course will help you learn about basic file handling commands.</del>
<del>First you should understand how to give an answer that learn requests.</del>
		
		Welcome to FreeBSD's Learning Shell

This learning shell will introduce you to some of the basics of
working with FreeBSD and the Unix command line structure. If your
new to Unix take some time and introduce yourself a better way to
compute.


The following are text conventions to help you distiguish from input.
These conventions are similar to those used in the man(manual) pages
and will benefit you to recognize.

Required input to be taken literally ................ "typed_command"
(In the man pages this will be highlighted and not in quotes)
Your optional response ................................ [user_option]
More than one response allowed ...... [user_option1 ... user_optionN]
You should choose one of the responses .......... [option1 | option2]
A key to press ......................................... ALL_CAPITALS
A key to press along with the control key ...................... ^KEY

<del>The most important thing to remember is that whenever you type a</del>
<del>command to UNIX or a response to "learn", you must press the</del>
<del>RETURN key or the system won't see your typing.</del>

<del>Sometimes learn asks you to come up with the right answer,</del>
<del>and then enter "answer", followed immediately by a space and the</del>
<del>single word which answers the question (and then RETURN).</del>
<del>This means that you would enter "answer WORD", where instead of</del>
<del>typing WORD you would type the word that is the correct answer.</del>

<del>For example, if the answer to a question were "bug", you would enter</del>

<del> answer bug</del>

As an example of a lesson segment if you were asked a question that you new
the answer was FreeBSD you would answer with "answer" [FreeBSD] like below.

# answer FreeBSD		note: the number sign denotes sh prompt

Type that in now, and don't forget to press ENTER at the end of
the line.  Don't use any quotation marks  or square brackets in your 
response.

#copyin						#####
#user						    |
#uncopyin					    |	
#match FreeBSD					    |
#bad answerFreeBSD				    |
Leave a space between "answer" and "FreeBSD".	  ## You should understand my 
#bad answer freebsd				  ## motive her Joerg
#bad answer FreeBsd				    |  
#bad answer FreeBSd				    |
#bad answer FREEBSD				#####

Aha, you have found out all on your own that FreeBSD and Unix generally
is case sensitive unlike DOS. Retype the answer in the correct case.

#log
#next
0.1a 5

---file L0.1a---
#
#  COMPONENT_NAME: (CMDMAN) commands that allow users to read online 
#                  documentation
# 
#  FUNCTIONS: 
# 
#  ORIGINS: 27
# 
#  Copyright (c) 1980 Regents of the University of California.
#  All rights reserved.  The Berkeley software License Agreement
#  specifies the terms and conditions for redistribution.
# 

#print
<del>Now you should understand the special characters del and ^U:</del>

<del>   del    cancels the previous character typed (delete or rubout)</del>
<del>   ^U     cancels the line being typed and puts you on a new line</del>
<del>                (called control-u)</del>
<del>These are the default characters used by the system.  Commonly,</del>
<del>del is replaced ^H (or backspace).</del>

DELETE,BACKSPACE,^H  :Deletes the line one character at a time
   	         ^U  :Deletes line and returns you back to cursor position

Remember the carat (^) represents the CTRL key being held down along with the
character key.

<del>^U is typed by holding down the CTRL (for control) key and pressing</del>
<del>the letter 'u'.  The reason that there are the two characters</del>
<del>'^' and 'U' to represent one special character is that ^U usually</del>
<del>will not print on the screen.</del>

<del>If you make a typing mistake, you can use del and ^U to correct it</del>
<del>before you finish the line and the computer won't ever know about it.</del>
<del>For example, what will the computer really receive if you type assuming</del>
<del>^H is used instead of del</del>

Assuming that ^H and ^U are control functions then what would the outcome of
the following line be.

dO s^Hell^UBs^HSD

<del>st^Hhe^Uthf^He</del>

Study this, and once you know enter "answer" [your_answer]

<del>at it?  Figure this out in your head and reply "answer WORD" where</del>
<del>WORD is the word as it will be interpreted, and don't forget RETURN.</del>
<del>For example, if you think it will get "dog", type</del>

<del>answer dog</del>

#copyin
#user
#uncopyin
#match BSD
#bad answerBSD
Leave a space between "answer" and "BSD".
#log
#next
0.1b 5


				 _______________________________________ 
How many Micro$oft executives   |\	       			       /|
 does it take to screw in a 	|  \    kevin_eliuk@sunshine.net     /  |
	lightbulb?		|    \	     Kevin G. Eliuk        /    |
				|    /^\_________________________/^\    |
None Bill will just redfine	|  /    		             \  |
Darkness[TM] as the industry	|/--===### Powered By FreeBSD 2.2.1    \|
	standard.		|	      www.freebsd.org 	        |
	  			 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970426211154.172E-100000>