/>
bash shell
 jbwyatt.com

. OS: Unix bash Shell

  • Unix shell: provides an interface to allow a user to direct the computer to accomplish a task.
  • "shell" hides the details and protects the critical code or "kernel" of the OS.
  • Shells: c-shell, bourne, korn, bash, z, ash, mudsh, fish ..
  • Provides a set of system utilities and a scripting language - why the language?



  • MINIMAL:
  • quota -v
  • ls [–la] [–lu] [-R]
  • cd [tab command completion]
  • mv [tab command completion]
  • cp [tab command completion]
  • rm [tab command completion]
  • CC [tab command completion]
  • mkdir
  • rmdir
  • who
  • ps, ps -e, ps -a
  • man
  • logout

  • ADVANCED:
  •   
       & :background processes (get job # and pid when you run)
          run job in background & create a new file for output
             jupiter|/export/home/wyatt/private$ timeRandomArray > xout &
          run job in background & append to a file
             jupiter|/export/home/wyatt/private$ timeRandomArray >> xout &
    
          fg  : brings job to foreground
    
       head, tail filename  : shows first/last 10 lines of file
       od -x ,-tcx1  : dump the file 
       redirection > (to file)  >> (append to file)
       pipe |
       .profile  alias   
       finger -l   .plan 
       

  • SCRIPTS:
  • Simple, domain-specific, (primitive), language that allows user to manipulate files, and programs in an automated way. Can provide arguments and can use variables. Provides pattern matching for naming, return values and simple control structures. NOT converted to binary - each instruction is interpreted and then executed.
  • alias
  • who
  • find

  • Unix Reference