On Sun, 29 Feb 2004, Orna Agmon wrote:
> http://www.haifux.org/lectures/92-sil/
>
> Your comments are most welcome.
1. in 'Shell - which shell?' - it's a good idea to mention that bash
appears in almost all 'free software' systems (linux, *bsd). it does
not exist in most commercial unices - and people comming to SiL are
likely to have to use other unices sometime, and wonder where bash has
gone to.
2. the 'changing the current shell' example looks confusing. the 'bash'
command _looks like_ it brings a line with 'tcsh' written in it.
better add some command in the middle, to seperate the shell switches.
that command would better be one showing we're indeed working under the
shell we just switched to. can't figure such a command now, though...
also, the name 'changing the current shell' is miss-leading. we're not
changing the shell, but rather executing a sub-shell.
thus, it's a good idea to also state that when we want to move back to
the former shell, we need to exit from the current shell using the
'exit' command. hmmm... so here is the example:
-----------------------------------------------
[EMAIL PROTECTED] ~]$ bash
bash-2.05a$ echo "i am in bash now"
i am in bash now
bash-2.05a$ exit
exit
[EMAIL PROTECTED] ~]$ echo "and back to tcsh"
and back to tcsh
[EMAIL PROTECTED] ~]$
-----------------------------------------------
i am putting the above example under the public domain - you may copy
this example to your slides if you wish ;)
3. in 'Every time you run it', what does the word 'runcom' mean? never
heard of this strange word.
4. in 'Where are my runcom files' - those 'runcom' files are _usually_
under the home directory, but for some programs they are under some dot
directory found in the home directory. so better add the word 'usually'
to the first bullet.
again - where did you come with the word 'runcom' from? is it from
somewhere in bash's manuals?
5. in 'Every time the shell starts - example' - you're showing different
examples for tcsh and for bash - is that on purpose? it is a bit
confusing - better show the same example in both shells.
this is also important, because the 'source' command in bash is
actually '.' (a single dot). and since most Linux users use bash, it'll
be a shame to neglect them.
also, after the 'vi .cshrc' command, you might want to add a line
stating something like:
(...add the line "alias lll 'echo Yehezkel'" at the bottom...)
otherwise, the slide alone makes no sense.
6. in 'Sourcing rc files' - the title does not match the text. perhaps
rename it to something like 'Caution when sourcing rc files', and add
two bullets at the beginning of the slide:
* If you modify an application's rc file, and make bad syntactic
errors, you might be un-able to run the application again until you
fix this rc file...
* ... which kind of makes things hard, if you messed up your shell's
rc file and logged out before checking it.
(modify the style to your liking). when placed after these bullets,
your current bullets will make more sense.
7. the 'alias' slide's examples stretch out of the screen on my 1024x768
screen's display - and the horizontal scroll-bar is disabled...
and by the way, i'd think of switching the different examples to bash's
syntax, since probably all the listeners are using bash, not tcsh.
8. in the second 'alias' slide, when programming, it's customary to use
full paths to commands (the Posix standard defines where different
basic commands are supposed to be).
9. in the 'echo' slide, you use shell variables, which you did not even
mention until now - and you don't mention them until many slides later.
perhaps change the examples then? or talk about variables first?
by the way, there are shell variables as well as environment variables.
10. in 'hold fast to your output' - the '$(command)' variant is specific
to bash - tcsh does not support it. this makes it all very confusing.
i think the best solution is to choose one shell (bash), and after
telling people that there are different shells, state you're giving
all examples only for the bash shell. the lecture is already too long
for a single meeting anyway.
11. in 'pipeline', the buffering works the other way around - when
outputing to the terminal, output is line-buffered. when outputing to
a pipe (or a file, or anything which is not a terminal), the output is
block-buffered (i.e. larger chunks).
12. in the 'apropos | grep' slide, better place 1-2 empty lines between
the end of the output of the first command, and the second command.
otherwise, it looks like everything is part of the output of the first
command.
13. in 'which shell am i using now', did you come up with such a
complicated (and error-prone) command on purpose?
better replace this with:
ps -p $$ | awk '{print $4}'
the original example is buggy, because the PID _might_ come up inside
other parts of ps's output (e.g. the egrep command that the user is
now typing).
also, you use '$$' without talking about shell variables, and
without talking about the $$ variable in particular. perhaps add
a slide about shell variables after the 'echo' slide, and showing some
of the built-in variables (such as '$$') ?
14. in 'how did you pronounce that', you have the command 'echo $$' twice.
is that on purpose?
15. in 'reading file contents', the lpr comment should be on the first
bullet, not on the second bullet. otherwise people might try to
print compressed files ;)
also, with 'less', the ability to search and scroll is actually almost
unlimited... it supports now many features that come in vi, including
searching backwards and forwards, setting markers, etc.
17. in 'standard input, output, error' in the first bullet, the phrase
'is the usually' should be replaced with 'is usually'.
18. in 'output redirection', there is no need to write '1>' in bash - the
default is to recirect the standard output. the number part becomes
important when dealing with standard error.
19. in 'error redirection', the '>&' redirects both standard output AND
standard error, while the '2>' in bash redirects ONLY the standard
error. better mention that, or change the bash example to '2>&1 >'
to be equivalent to the tcsh example.
20. in 'the ground we work on', there's a missing line of executing 'sleep
5000 &', after the '#Now i will be wiser' line. ofcourse, this will be
confusing, since you only mention the '&' character in the 'more job
control' slide.
also, you did not mention comments until now, as far as i can
remember.
21. in the 'more job control' - better get rid of 'nice' - it's not that
important in an introductory lecture. then you can change the name of
the slide to suite the fact that it talks about '&' and 'fg'.
for example 'behind the scene...'.
22. 'special parameters' actually talks about 'special variables'.
also, in the first bullet, the '$HOME' variable is surrounded by
commas, for some reason i canot perceive.
in the second bullet, better write instead 'This shell's process ID'.
23. in 'PATH', the dot is lost in the text 'Adding . in the path...'.
better replce this with:
Adding '.' (dot) in the path...
also, replace 'chnages' with 'changes'.
also, the 'test' example is backwards - people normally have the
other problem - they DON'T have '.' in their path, compile/write
a program named test, and when they try to run it, nothing happens.
24. in 'everyone has it and i don't!?', first bullet, replace 'fi nd' with
'find' (an extra space in the middle of the word). actually this seems
to have occured all over this slide.
also, 'rehash' is required in tcsh. in bash, it does not exist and
is thus not required.
25. in 'remote shell', better state in the slide that putty is an ssh
client for windows.
ok, enough for now - we're already at slide 30-something. a good place to
end the lecture - the rest of the material could come in a seperate SiL
lecture.
night,
--
guy
"For world domination - press 1,
or dial 0, and please hold, for the creator." -- nob o. dy
--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]