% CVSId: $Id: user_mode_linux.tex,v 1.2 2003/10/27 21:21:00 mulix Exp $

\documentclass[final, total, pdf, colorBG, slideColor]{prosper}

\title{Shell}
\subtitle{Using the command line}
\author{Orna Agmon}
\email{ladypine at vipe.technion.ac.il}
\institution{Haifux}

\slideCaption{Shell}

\begin{document}

\maketitle

\begin{slide}{TOC}
\begin{itemize}
\item Various shells
\item Customizing the shell
\item getting help and information
\item Combining simple and useful commands 
\item output redirection
\item lists of commands
\item job control
\item environment variables
\item Remote shell
\item textual editors
\item textual clients
\item references
\end{itemize}
	
\end{slide} 

\begin{slide}{What is the shell?}
\begin{itemize}
\item The shell is the wrapper around the system: a communication
means between the user and the system
\item The shell is the manner in
which the user can interact with the system through the terminal.
\item The shell is also a script interpreter. 
The simplest script is a bunch of shell commands. 
\item Shell scripts are used in order to boot the system. 
\item The user can also write and execute shell scripts.
\end{itemize}
\end{slide}

\begin{slide}{Shell - which shell?}
\begin{itemize}
\item There are several kinds of shells. For example, bash (Bourne Again
Shell), csh, tcsh, zsh, ksh (Korn Shell). The most important shell is
bash, since it is available on almost every free Unix system. 
The Linux system scripts use bash.
\item The default shell for the user is set in the /etc/passwd file. Here is
a line out of this file for example:

\verb+dana:x:500:500:Dana,,,:/home/dana:/bin/bash+
\item This line means that user dana uses bash (located on the system at
/bin/bash) as her default shell.
\end{itemize}
\end{slide}

\begin{slide}{Starting to work in another shell}
If Dana wishes to temporarily use another shell, she can
simply call this shell from the command line:
\begin{tt}\begin{tiny}\begin{verbatim}
[dana@granada ~]$ bash
dana@granada:~$ #In bash now
dana@granada:~$ exit
[dana@granada ~]$ bash
dana@granada:~$ #In bash now, going to hit ctrl D
dana@granada:~$ exit
[dana@granada ~]$ #In original shell now
\end{verbatim}\end{tiny}\end{tt}
\end{slide}

\begin{slide}{{\it chsh} - Changing the default shell}
If Dana wishes to change her default shell, she can use the chsh
command:\begin{tt}\begin{tiny}\begin{verbatim}
[dana@granada ~]$ echo $SHELL
/bin/bash
[dana@granada ~]$ chsh
Password:
Changing the login shell for dana
Enter the new value, or press return for the default
        Login Shell [/bin/bash]: /bin/tcsh
[dana@granada ~]$ echo $SHELL
/bin/bash
[dana@granada ~]$ su dana
Password:
[dana@granada ~]$ echo $SHELL
/bin/tcsh
\end{verbatim}\end{tiny}\end{tt}
\end{slide}

\begin{slide}{Every time you run it}
For many programs, there is a file called 
.\{program-name\}rc.
This file contains commands to execute automatically
every time the program starts running.

For example: 
\begin{itemize}
\item .vimrc (used for gvim as well as vim)
\item .bashrc
\item .cshrc (used for both tcsh and csh)
\end{itemize}
\end{slide}
\begin{slide}{Where are my .*rc files?}
\begin{itemize}
\item Those files are usually located in the home directory.
\item All those files begin with a period,
 so they are not listed using \verb+ls+, only \verb+ls -a+.
\begin{verbatim}
[dana@granada ~]$ ls
dummy
[dana@granada ~]$ ls -a
.   .alias         .bash_profile  .cshrc  .pinerc
..  .bash_history  .bashrc        dummy   .viminfo
\end{verbatim}
\end{itemize}
\end{slide}

\begin{slide}{Every time the shell starts - example}
When updating the runcom file, it does not take effect immediately in
the terminal you are using, and you need to {\it source} it (read it
explicitely).

 Let's watch Dana teach her shells to sing:
\begin{tt}\begin{tiny}\begin{verbatim}
[dana@granada ~]$ tcsh
[dana@granada ~]$ unalias lll
[dana@granada ~]$ alias lll echo yehezkel
[dana@granada ~]$ lll
yehezkel
[dana@granada ~]$ bash
dana@granada:~$ unalias lll
bash: unalias: lll: not found
dana@granada:~$ alias lll="echo yehezkel"
dana@granada:~$ lll
yehezkel
dana@granada:~$
\end{verbatim}\end{tiny}\end{tt}
\end{slide}
\begin{slide}{Permanent Changes}
To make this change happen every time we start the shell,
 we insert the change in the .*rc file:
\begin{verbatim}
[dana@granada ~]$ unalias lll
[dana@granada ~]$ vi .cshrc #Here we add alias lll echo yehezkel
to the bottom of the .cshrc file
[dana@granada ~]$ lll
lll: Command not found.
[dana@granada ~]$ source .cshrc
[dana@granada ~]$ lll
yehezkel
\end{verbatim}
In bash, we state the same line (alias lll='echo yehezkel') 
in the .bashrc file, and source it using the . command.
\end{slide}

\begin{slide}{Caution when sourcing rc file}
\begin{itemize}
\item If you make bad syntax error in the rc file of an application,
 you may not be able to re-run it until you have fixed the rc file.
 \item This is most problematic when the program is the shell.
\item keep a back up copy of your rc file. Even better to keep
versions. See {\it rcs}, for example.
\item For shell rc files: keep an open terminal working without
sourcing the rc file, in case you messed up your own shell.
\end{itemize}
\end{slide}

\begin{slide}{{\it alias}}
\begin{itemize}
\item Create short ways to say a long command using alias:
\begin{verbatim}
[ladypine@granada ~]$ grep efnet ~/.cshrc
alias efnet 'BitchX -Nan ladypine irc.inter.net.il'
[ladypine@granada ~]$ which efnet
efnet:   aliased to BitchX -Nan ladypine irc.inter.net.il
[ladypine@granada ~]$
\end{verbatim}
\item Remember to run a command in a certain way using alias:
\begin{verbatim}
[ladypine@granada ~]$ grep rm ~/.cshrc
alias rm 'rm -i'
\end{verbatim}
\item To use the original command once, escape the command:
\verb+\+rm
\item To stop aliasing use {\it unalias}.
\end{itemize}
\end{slide}

\begin{slide}{alias in programming}
\begin{itemize}
\item Use full paths to commands when possible - on POSIX systems, utilities are located in specific places.
\item When using commands without paths - use escaped commands - you
never know how the users aliased their commands.
aliases are not always available. Depends on the shell.
\end{itemize}
\end{slide}

\begin{slide}{Shell variables}
\begin{itemize}
\item There are two kinds of shell variables: regular variables, 
which are local, and environment variables, which are inherited by 
the programs executed from the shell.
\item Setting environment variables: 
In bash \begin{verbatim}export var=value\end{verbatim}
In tcsh \begin{verbatim}setenv var value\end{verbatim}
\end{itemize}
\end{slide}

\begin{slide}{echo}
The {\it echo} command quotes back what you told it to say. Useful for
debugging as well as communicating with the user.
\begin{verbatim}
[ladypine@granada ~]$ echo DISPLAY
DISPLAY
[ladypine@granada ~]$ echo $DISPLAY
:0.0
[ladypine@granada ~]$ echo $(DISPLAY)
Illegal variable name.
\end{verbatim}
What went wrong in the last one??
\end{slide}
\begin{slide}{Hold fast to your output}

backticks `command` holds the output of the command.
\begin{verbatim}
ladypine@granada:~$ whatis pwd
pwd (1)   - print name of current/working
directory
ladypine@granada:~$ a=`whatis pwd`
ladypine@granada:~$ echo $a
pwd (1) - print name of current/working
directory
ladypine@granada:~$ a=$(whatis pwd)#bash specific
ladypine@granada:~$ echo $a
pwd (1) - print name of current/working 
directory
ladypine@granada:~$
\end{verbatim} 
\end{slide} 

\begin{slide}{What is this command?}
Use the ``which'' command to know what the command invokes really.

\begin{verbatim}
[dana@granada ~]$ tcsh
[dana@granada ~]$ which lll
lll:     aliased to echo yehezkel
[dana@granada ~]$ which swriter
/usr/lib/openoffice/program/swriter
\end{verbatim}
To know more about commands:
\begin{itemize}
\item man - old style, one long file
\item info - new, browseable
\item pinfo - even newer
\item whatis -short format
\item apropos - search the man pages
\end{itemize}
\end{slide}

\begin{slide}{grep - searching for text patterns}
grep searches for regular expressions in the input. It can be used to
search for a line in a file, as seen in the previous example:
\begin{verbatim}
[ladypine@granada ~]$ grep rm ~/.cshrc
alias rm 'rm -i'
\end{verbatim}

It can also be used to find the file in which the expression is
mentioned. For example, in order to search my mail folders (each is a
file) for the word shell:

\begin{verbatim}
[ladypine@granada ~]$ grep shell mail/*
\end{verbatim}

Important switches: -n to give the line number. -i for case insensitivity.
\end{slide}

\begin{slide}{|||||pipeline|||||}
The output of one command can be piped into another command by
using a pipe. 
The output is then passed by blocks to the next command.

Concating commands via a pipe is one of the most powerful features of
the shell.
\end{slide}

\begin{slide}{Example: {\it apropos} | {\it grep}}
\begin{tt}
\begin{tiny}
\begin{verbatim}
[dana@granada ~]$ apropos keymap
install-keymap (8)   - expand a given keymap and install it as boot-time keymap
keymaps (5)          - keyboard table descriptions for loadkeys and dumpkeys
XChangeDeviceKeyMapping (3x) - query or change device key mappings
XFreeModifierMap XModifierKeymap (3x) [XChangeKeyboardMapping] - manipulate keyboard encoding and keyboard encoding structure
XGetDeviceKeyMapping (3x) - query or change device key mappings
XKeymapEvent (3x)    - KeymapNotify event structure
XModifierKeymap (3x) - manipulate keyboard encoding and keyboard encoding structure
xmodmap (1x)         - utility for modifying keymaps and pointer button mappings in X
XQueryKeymap (3x)    - manipulate keyboard settings and keyboard control structure


[dana@granada ~]$ apropos keymap | grep mod
xmodmap (1x)         - utility for modifying keymaps and pointer button mappings in X
[dana@granada ~]$
\end{verbatim}
\end{tiny}
\end{tt}

\end{slide}

\begin{slide}{which shell am I using now?}
\begin{tt}\begin{tiny}\begin{verbatim}
[dana@granada ~]$ ksh
$ ps -p $$ |  tail -1| awk '{ print $4 }'
ksh
$ echo $SHELL
/bin/tcsh
$
\end{verbatim}\end{tiny}\end{tt}
\end{slide}

\begin{slide}{How did you pronounce that??}
\begin{tt}\begin{tiny}\begin{verbatim}
$ ps -p  $$
  PID TTY          TIME CMD
 2310 pts/3    00:00:00 ksh
$  ps -p $$| tail -1
 2310 pts/3    00:00:00 ksh
$  ps -p $$| tail -1 |awk '{ print $4 }'
ksh
$
\end{verbatim}\end{tiny}\end{tt}
\end{slide}



\begin{slide}{Reading File contents}
\begin{itemize}
\item {\it lpr} will print the whole file to the printer.
\item {\it cat} will print (to screen) the whole file.
\item {\it zcat} will do the same for gzipped files. 
\item {\it more} and {\it less} 
will show the contents of the file by pages, with limited ability
of searching and scrolling it.
\end{itemize}
\end{slide}

\begin{slide}{Heads or tails?}
\begin{itemize}
\item {\it head} and {\it tail} will show the ends of the file.
\begin{verbatim}
[dana@granada ~]$ head -1 dummy
a b a
dana@granada:~$ tail -2 dummy
a c
 
dana@granada:~$
\end{verbatim}
\item Use {\it tail -f} to watch the end of a file which is being
updated. For example:
\begin{verbatim}
tail -f /var/log/messages
\end{verbatim}
\end{itemize}
\end{slide}



\begin{slide}{Standard Input, Output, Error}
\begin{itemize}
\item The standard input (0) is usually the keyboard
\item  the standard output (1) is usually the terminal screen
\item The standard error is (2) usually also the terminal screen
\end{itemize}

All this can be changed.
\end{slide}
\begin{slide}{Output Redirection}
In tcsh and bash:
\begin{verbatim}
 ls > tmp
\end{verbatim}
This means the same as writing in bash:
\begin{verbatim}
 ls 1> tmp
\end{verbatim}
Appending in tcsh and bash:

\begin{verbatim}
 ls >> tmp
\end{verbatim}
\end{slide}

\begin{slide}{Error and Output Redirection}
In tcsh:
\begin{verbatim}
 ls >& tmp
\end{verbatim}
In bash:
\begin{verbatim}
 ls 2>&1 > tmp
\end{verbatim}
Example - Error redirection in bash:
\begin{tt}\begin{tiny}\begin{verbatim}
dana@granada:~$ ls kuku kukiya 2>tmp
kukiya
dana@granada:~$ ls kuku kukiya
ls: kuku: No such file or directory
kukiya
dana@granada:~$ cat tmp
ls: kuku: No such file or directory
dana@granada:~$
\end{verbatim}\end{tiny}\end{tt}
\end{slide}

\begin{slide}{Command lists: list , ||}
\begin{itemize}
\item ; - perform a list of tasks.
\begin{tt}\begin{tiny}\begin{verbatim}
dana@granada:~$ ls a*; ls d*
a
d  dummy
dana@granada:~$
\end{verbatim}\end{tiny}\end{tt}
\item || - perform the next only if the previous commands failed:
\begin{tt}\begin{tiny}\begin{verbatim}
dana@granada:~$ ls a* || ls d*
a
dana@granada:~$
\end{verbatim}\end{tiny}\end{tt}
\end{itemize}
\end{slide}

\begin{slide}{Command lists, \&\&, subshell}
\begin{itemize}
\item \&\& - perfrom the next in the list only if the previous commands
succeded:
\begin{tt}\begin{tiny}\begin{verbatim}
dana@granada:~$ ./configure && make && make install
\end{verbatim}\end{tiny}\end{tt}
Or, in order to prepare and test this lecture:
\begin{tt}\begin{tiny}\begin{verbatim}
[ladypine@granada shell]$ latex shell && dvips -G0 -Ppdf
 shell.dvi && ps2pdf shell.ps && xpdf shell.pdf
\end{verbatim}\end{tiny}\end{tt}
\item () - a subshell. parameters do not take effect on the outside.
\begin{tt}\begin{tiny}\begin{verbatim}
dana@granada:~$ export animal="king" ;
dana@granada:~$ (export animal="lion"; echo $animal); echo $animal
lion
king
dana@granada:~$
\end{verbatim}\end{tiny}\end{tt}
\end{itemize}
\end{slide}


\begin{slide}{The ground we work on}
A process can run in the {\it foreground}
 or in the {\it background}. When in the
foreground, no other command can be dealt with until the command
returns.
It can be moved to the background:
\begin{tt}\begin{tiny}\begin{verbatim}
dana@granada:~$ sleep 300
Talk to me! Please, respond?
Maybe I will move you to the background by typing ctrl z?
[1]+  Stopped                 sleep 300
dana@granada:~$ bg
[1]+ sleep 300 &
dana@granada:~$ jobs
[1]+  Running                 sleep 300 &
\end{verbatim}\end{tiny}\end{tt}
\end{slide}

\begin{slide}{{\small What shall we do with a foreground process?}}
It can also be killed:
\begin{tt}\begin{tiny}\begin{verbatim}
dana@granada:~$ sleep 500 
[1]+  Stopped                 sleep 500
dana@granada:~$ bg
[1]+ sleep 500 &
dana@granada:~$ sleep 400
I will now kill the process in the foreground with ctrl c
 
dana@granada:~$ jobs
[1]+  Running                 sleep 500 &
dana@granada:~$
\end{verbatim}\end{tiny}\end{tt}
\end{slide}
\begin{slide}{Behind the Scenes - More Job Control}
\begin{itemize}
\item Tasks can be sent in the background to begin with:
\begin{tt}\begin{tiny}\begin{verbatim}
dana@granada:~$ sleep 4&
[1] 12175
dana@granada:~$ fg
sleep 4
dana@granada:~$
\end{verbatim}\end{tiny}\end{tt}
\item Tasks can be {\it nice} to begin with, or made nicer in due time
using {\it renice}.
\end{itemize}
\end{slide}


\begin{slide}{Special Variables}
\begin{itemize}
\item \verb+~+ , \$HOME, \verb+~+dana - home directory for the user (or for dana, in
this case)
\item \$\$ - the shell's process ID
\item ! - in bash - the  process ID of the most recently executed background (asynchronous) command.
\item Positional Variables: \$1, \$2 ...
\end{itemize}

! also uses to repeat a command which starts with a letter
combination:
\begin{tt}\begin{tiny}\begin{verbatim}
[dana@granada ~]$ ls -lt a*
-rw-r--r--    1 dana     dana            6 2004-02-28 09:48 a
[dana@granada ~]$ ls -la a*
-rw-r--r--    1 dana     dana            6 2004-02-28 09:48 a
[dana@granada ~]$ !l
ls -la a*
-rw-r--r--    1 dana     dana            6 2004-02-28 09:48 a
\end{verbatim}\end{tiny}\end{tt}
\end{slide}

\begin{slide}{history}
\begin{tt}\begin{tiny}\begin{verbatim}
[dana@granada ~]$ history
     8  19:35   ls -lt a*
     9  19:36   ls -la a*
    10  19:36   ls -la a*
    11  19:36   history
\end{verbatim}\end{tiny}\end{tt}
\end{slide}



\begin{slide}{PATH}
The PATH is the list of directories that are searched for when an
application is requested.
\begin{verbatim}
dana@granada:~$ echo $PATH
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:
/usr/bin/X11:/usr/games:/home/dana/bin:/home/dana/dl/OpenOffice.org644/program/ :
/home/dana/dl/rpm/splint-3.1.1/bin
\end{verbatim}
Adding dot '.' in the path is dangerous for two reasons:
\begin{itemize}
\item Security: what if somebody placed an exeutable in your directory,
called ls, and it hides all other changes from you?
\item Proper functioning. what if you created a program called test, and
it comes first in the path? then /usr/bin/test
will be ignored.
\end{itemize}
If you do decide to add . in your path, do it in the end of the \$PATH,
 to minimize mistakes.
\end{slide}

\begin{slide}{Everyone has it and I don't!?}
If something is installed on the system, but not for you, there may be
several reasons:
\begin{itemize}
\item The program is installed, but it is not in your \$PATH. Add it to
your \$PATH or add an {\it alias} to find the program.
\item The man page is installed, but you cannot find it. Correct your
\$MANPATH.
\item You are not sure what to add to your path. You are not even sure
if it is installed at all. Use {\it locate} to find traces of the mysterious
program.
\item It was installed, but locate does not find it. Update
{\it locatedb} using {\it updatedb},
 or wait for it to be updated - this (usually happens|should
happen)  at night.
\item In the meantime, or from files not covered by locate, use {\it find}.
\item In tcsh: It was installed and it is in your path, but it does not
work. Use {\it rehash} to update your available programs in the
current terminal.
\end{itemize}
\end{slide} 

\begin{slide}{find}
\begin{tt}\begin{tiny}\begin{verbatim}
[ladypine@granada ~]$ find . -name haifux -print
./haifux
\end{verbatim}\end{tiny}\end{tt}

\begin{tt}\begin{tiny}\begin{verbatim}
[ladypine@vipe ~]find . -name 'linux*' -print
./public_html/linux4me.html
./public_html/linux4me_present.html
\end{verbatim}\end{tiny}\end{tt}

\end{slide}



\begin{slide}{Remote Shell}
\begin {itemize}
\item Secure: ssh, putty (ssh client for Windows)
\item Insecure: rsh, rlogin,telnet
\end {itemize}
\end{slide} 

\begin{slide}{Display from a remote host}
\begin{itemize} 
\item {\bf Your} computer as an Xserver.
The X server is the computer which gives X services. Even if the
``real'' server is a fast computer which provides CPU services, mail
services, etc.
\item Check the display on a local machine for two users. ladypine owns the
console, and dana does not:
\begin{verbatim}
[ladypine@granada ~]$ echo $DISPLAY
:0.0
[ladypine@granada ~]$ su - dana
Password:
[dana@granada ~]$ echo $DISPLAY
DISPLAY: Undefined variable.
\end{verbatim}
\end{itemize}
\end{slide}

\begin{slide}{Setting the display}
\begin{itemize}
\item Set the display on the terminal using the ip or domain name of the
computer you are sitting at:
\begin{itemize}
\item In bash:
\begin{verbatim}
export DISPLAY=granada.merseine.nu:0.0
\end{verbatim}
\item In tcsh:
\begin{verbatim}
setenv DISPLAY granada.merseine.nu:0.0
\end{verbatim}
\end{itemize}
\item Note the \$ before the name of the variable when it is
evaluated.
\end{itemize}
\end{slide}

\begin{slide}{Allow X forwarding}
Allowing X forwarding is done on behalf of the Xserver - the computer
that is about to let others take over its screen.
\begin{itemize}
\item Allow a terminal on vipe to use my x server:
\begin{verbatim}
xhost +vipe.technion.ac.il
\end{verbatim}
\item Open a secure connection to a remote host, asking it to display
graphics on the current terminal as a Xserver:
\begin{verbatim}
ssh -X
\end{verbatim}
\item Check the display:
\begin{verbatim}
xeyes
\end{verbatim}
\end{itemize}
\end{slide}
 
\begin{slide}{Environment Variables}
\begin{itemize}
\item Environment variables are shell variables which are passed on to child
processes.
\item To find all environment variables use {\it env} (without
paramaters).
\item In tcsh also setenv (without paramaters).
\item Example:
\begin{tt}\begin{tiny}\begin{verbatim}
dana@granada:~$ env
HOST=granada
SHELL=/bin/tcsh
LC_ALL=he_IL
MAIL=/var/mail/dana
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/sbin:/usr/sbin
PWD=/home/dana
HOME=/home/dana
LOGNAME=dana
\end{verbatim}\end{tiny}\end{tt}
\end{itemize}
\end{slide}



\begin{slide}{Gluing files together: cat,paste}
\begin{verbatim}
[dana@granada ~]$ cat a
a1
a2
[dana@granada ~]$ cat b
b1
b2
[dana@granada ~]$ cat a b
a1
a2
b1
b2
[dana@granada ~]$ paste a b
a1      b1
a2      b2
\end{verbatim}
\end{slide} 

\begin{slide}{{\it tac, sort}}
\begin{verbatim}
[dana@granada ~]$ tac a
a2
a1
dana@granada:~$ cat d
a1      4
a2      0
b       3
d       9
dana@granada:~$ sort -k 2 d
a2      0
b       3
a1      4
d       9
dana@granada:~$
\end{verbatim}
\end{slide}



\begin{slide}{Differing files}
\begin{itemize}
\item {\it diff}. Useful keys: -B to ignore blanks, -u for unified format.
\item {\it patch}. Apply a patch in the format given by diff -u.
\item {\it cmp}. Just tell me if they differ
\item {\it zcmp}. For gzipped files.
\end{itemize}
\end{slide} 


\begin{slide}{Non Interactive Editors}
\begin{itemize}
\item awk = "Aho Weinberger and Kernighan", gawk. 
\item Perl = "Practical Extraction and Report Language" with the -e
switch.
\item sed = Stream Editor
\end{itemize}
\end{slide}


\begin{slide}{Perl -e}
\begin{verbatim}
[dana@granada ~]$ perl -e '$i="Dana Nama\n"; print $i;
                  $i=~s/N/K/; print $i;'
Dana Nama
Dana Kama
\end{verbatim}
\end{slide}

\begin{slide}{sed}
sed is useful for changing files automatically by a set of
instructions. You can also describe it as a filter.

\begin{verbatim}
$sed 's/to-be-replaced/replaced/g' dummyfile
\end{verbatim}

For example:
\begin{tt}\begin{tiny}\begin{verbatim}
[dana@granada ~]$ more dummy
a b a
a c
[dana@granada ~]$ sed 's/a/A/' dummy
A b a
A c
[dana@granada ~]$ sed 's/a/A/g' dummy
A b A
A c
[dana@granada ~]$ more dummy
a b a
a c
\end{verbatim}\end{tiny}\end{tt}
\end{slide} 


\begin{slide}{Editing in the terminal}
\begin{itemize}
\item vi, vim
\item xemacs -mw (or if the DISPLAY is not set)
\item pico
\end{itemize}
\end{slide}

\begin{slide}{Textual clients}
\begin{itemize}
\item nap - Linux napster client
\item lynx - textual browser (show accessing a journal and printing it or
sending it.
\item BitchX- irc client
\item mutt, pine - mail clients.
\end{itemize}
\end{slide} 

\begin{slide}{Lynx - a textual html browser}
\begin{tt}\begin{tiny}\begin{verbatim}
            Haifux - Haifa Linux Club - What is the Haifa Linux Club? (p1 of 4)
                                                                                
   Haifux Logo
     * Where do we meet?
     * Upcoming Lectures
     * Mailing Lists
     * Give a Lecture
     * Events
     * Projects
     * Logo
     * Israeli Linux Links
     * Israeli Linux HOWTO-s
     * Linux Links
     * Site Code
    -- press space for next page --
  Arrow keys: Up and Down to move.  Right to follow a link; Left to go back.
 H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list

\end{verbatim}\end{tiny}\end{tt}
\end{slide}




\begin{slide}{Pack to go}
\begin{itemize}
\item uuencode and uudecode
\item gzip and gunzip
\item dos2unix and unix2dos
\item convert
\end{itemize}
\end{slide}

\begin{slide}{Having a split personality}
\begin{itemize}
\item {\it logname} - the name of the logged in user.
\item {\it whoami} - the name of the user atached to the current process
\begin{tt}\begin{tiny}\begin{verbatim}
[ladypine@granada ~]$ su dana
Password:
[dana@granada ladypine]$ whoami
dana
[dana@granada ladypine]$ logname
ladypine
\end{verbatim}\end{tiny}\end{tt}
\item {\it last} - who logged in lately
\item {\it who} - who is currently logged in
\begin{tt}\begin{tiny}\begin{verbatim}
[dana@granada ~]$ who
muli     pts/1        Feb 28 17:52 (alhambra)
ladypine :0           Feb 20 19:26
ladypine pts/3        Feb 22 18:31 (:0.0)
\end{verbatim}\end{tiny}\end{tt}
\end{itemize}
\end{slide} 

\begin{slide}{References used for this lecture}
\begin{itemize}
\item GNU's bash
http://www.gnu.org/software/bash/bash.html
\item  Linux Documentation project 
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
\item  Advanced bash programing
http://www.tldp.org/LDP/abs/html/
\item Working more productively with bash 2.x by Ian Macdonald
http://www.caliban.org/bash/
\item Why not use csh for prgramming?
http://www.etext.org/Quartz/computer/unix/csh.harmful.gz
\item What does {some strange unix command name} stand for?
http://www.faqs.org/faqs/unix-faq/faq/part1/section-3.html
\end{itemize}
\end{slide}
\begin{slide}{More references}
\begin{itemize}
\item  Learning the bash Shell, 2nd Edition
by Cameron Newham, Bill Rosenblatt
\begin{verbatim}http://www.amazon.com/exec/obidos/ASIN/1565923472/
calibanorg-20/102-5966084-5605729?creative=125581&camp=2321&link_code=as1
\end{verbatim}

\item What's up's Hebrew shell guide  
\begin{verbatim}
http://whatsup.org.il/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=50&parent_id=0
\end{verbatim}
\end{itemize}
\end{slide} 

\end{document}
