Unix Users's Guide

July 08, 2018

Permission to use, copy, modify and distribute the Unix User's Guide for any purpose and without fee is hereby granted in perpetuity, provided that the above copyright notice and this paragraph appear in all copies.


Table of Contents

1. Using Unix
1.1. Keep It Simple, Stupid
1.2. What is Unix?
1.3. Self-test
1.4. Unix User Interfaces
1.5. Still Need Windows? Don't Panic!
1.6. Logging In Remotely
1.7. Unix Command Basics
1.8. Basic Shell Tools
1.9. Processes
1.10. The Unix File system
1.11. Unix Commands and the Shell
1.12. Unix Command Quick Reference
1.13. POSIX and Extensions
1.14. File Transfer
1.15. Environment Variables
1.16. Shell Variables
1.17. More Shell Tools
1.18. Process Control
1.19. Remote Graphics
1.20. Where to Learn More
2. Unix Shell Scripting
2.1. What is a Shell Script?
2.2. Scripts vs Programs
2.3. Why Write Shell Scripts?
2.4. Which Shell?
2.5. Writing and Running Shell Scripts
2.6. Shell Start-up Scripts
2.7. Sourcing Scripts
2.8. Scripting Constructs
2.9. Strings
2.10. Output
2.11. Shell and Environment Variables
2.12. Hard and Soft Quotes
2.13. User Input
2.14. Conditional Execution
2.15. Loops
2.16. Generalizing Your Code
2.17. Scripting an Analysis Pipeline
2.18. Functions and Calling other Scripts
2.19. Alias
2.20. Shell Flags and Variables
2.21. Arrays
2.22. Good and Bad Practices
2.23. Here Documents
2.24. Common Unix Tools Used in Scripts

List of Figures

1.1. Sample of a Unix File system

List of Tables

1.1. Partial List of Unix Operating Systems
1.2. Pkgsrc Build Times
1.3. Default Key Bindings in some Shells
1.4. Globbing Symbols
1.5. Special Directory Symbols
1.6. Common hot keys in more
1.7. Unix Commands
1.8. Common Extensions
1.9. Standard Streams
1.10. Redirection Operators
1.11. Pipe Operators
2.1. Conventional script file name extensions
2.2. Shell Start Up Scripts
2.3. Printf Format Specifiers
2.4. Special Character Sequences
2.5. Test Relational Operators
2.6.
2.7. C Shell Relational Operators
2.8. Shell Conditional Operators
2.9.

List of Examples

1.1. White space in an Argument
1.2. Pushing data with rsync
1.3. Pulling data with rsync
1.4. Simple Pipe
1.5. Filters
2.1. A Simple Bash Script
2.2. A Simple T-shell Script
2.3. Multiple File Downloads