Lecture # 7 - Systems and Network Programming

Shells and Scripting

House keeping items:

Agenda for Today (02/05/20):

Lecture # 7 Notes:

  1. Scripting Presentation

Resources:

    Shell Scripting:

    1. Writing Shell Scripts: Linuxcommand.org
    2. Shell scripts (beginning chapter 24)
    3. Nice Shell Scripting Tutorial
    4. BASH Tutorial
    5. BASH Functions Tutorial
    6. BASH Guide for Beginners
    7. BASH Variables tutorial
    8. BASH If (test command) tutorial
    9. man page: test command
    10. BASH Loops tutorial
    11. BASH Arrays tutorial
    12. 40 Simple Linux Shell Script Examples
    13. Shell Programming Examples
    14. 5 Shell Scripts for Linux Newbies
    15. Download class Examples: here

    vi editor

    1. Class Text (chapter 12): Introduction to vi
    2. Basic Commands: Colorado State University
    3. vi Tutorial: GeeksforGeeks
    4. vi Introduction: City College San Franciso

    grep - g/re/p (global search a regular expression and print)

    1. grep, regular expressions (regex): Class Text: Chapter 19
    2. Previous CSE384 Instructor Notes: YUZHE (RICHARD) TANG Find and grep presentation
    3. Complete regex tutorial
    4. 15 practical grep examples
    5. more grep examples
    6. Regex cheat sheet: MIT
    7. Regex (Basic) cheat sheet
    8. Nice regex overview, programming examples

    Find and locate files

    1. Class Text (chapter 17) Searching for Files
    2. Find command tutorial: Indiana University
    3. Find Command (Tutorial)
    4. Previous CSE384 Instructor Notes: YUZHE (RICHARD) TANG Find and grep presentation

    sed - stream editor

    1. Class Text (Chapter 20): Text Processing
    2. sed - stream editor
    3. sed examples

    AWK programming langauge

    1. Tutorialspoint
    2. Typical Uses
      • Producing formatted text reports
      • Performing arithmetic operations
      • Performing string operations, and many more

    Processes: ps command

    1. Class Text (chapter 10) processes

Environment Setup Notes:

  1. Install VirtualBox
  2. Install Linux Mint (based on Ubuntu -- I prefer MATE desktop, but many people like Cinnamon)
    • Desktop Comparisons: MATE versus Cinnamon
    • Install Guest Additions - device drivers and system applications that optimize the guest operating system for better performance and usability.
  3. Enable "Shared Clipboard and Drag'nDrop": Settings -> Advanced
  4. Configure shared folders, then run the following commands..
    1. run: sudo usermod -a -G vboxsf `whoami`
    2. run: sudo chown -R `whoami`:users name-of-mount-point
    3. log out, and log back in
  5. Update Mint (run): "sudo apt update && sudo apt upgrade -y"

Interesting Technologies related to Linux:

  1. Kernel-based Virtual Machine (KVM) - turn Linux into a Hypervisor
  2. Docker (Container Technology)
  3. TCPDump & LIBPCAP
  4. Extended Berkeley Packet Filter (eBPF)
*** Action Items for Next Class ***
  • H/W # 4 posted: due Weds: 02/12
  • Begin C/C++ programming
  • complete environment (VirtualBox, Mint) setup