Index
Symbols
- ! (exclamation point)
- "" (quotation marks), enclosing names of arguments, How echo Works
- #[test] attribute, Writing and Running Integration Tests
- $ (dollar sign)
- $? bash variable, Understanding Program Exit Values
- % (percent sign), indicating end of fortune record, Solution
- & operator, Opening a File or STDIN
- && (logical and) operator, Exit Values Make Programs Composable, Solution
- combining with || (logical or operator), Solution
- () (parentheses)
- (.)\1 pattern, finding any character repeated twice, Defining the Arguments
- * (asterisk)
- + (plus sign)
- +0 starting point in tail, Defining the Arguments
- += (addition and assignment) operator, Printing Line Numbers
- - (dash or minus sign)
- -> symbol, indicating symbolic links, How find Works
- . (dot)
- // (slashes), comments beginning with, Solution
- /// (slashes), to indicate documentation, Solution
- ::<> (turbofish) operator, Reading Bytes from a File, Defining and Validating the Arguments
- ; (semicolon), lack of terminating in functions, Using the Result Type
- > (redirect) operator in bash, How echo Works, Opening a File or STDIN
- ? (question mark)
- [] (square brackets)
- \ (backslash), escaping special characters, How find Works
- \1 backreference, Defining the Arguments
- \d (digits) in regular expressions, Using a Regular Expression to Match an Integer with an Optional Sign
- ^ (caret)
- _ (underscore)
- {} (curly braces)
- | (pipe) symbol
- || (pipes)
A
- actual output versus expected output, Testing the Program Output
- ALL_CAPS, using to name global constants, Using a Regular Expression to Match an Integer with an Optional Sign
- ansi_term crate, Getting Started
- ansi_term::Style::reverse, Writing the Program
- App struct, Parsing Command-Line Arguments Using clap
- App::get_matches function, Parsing Command-Line Arguments Using clap
- Arg struct, Parsing Command-Line Arguments Using clap
- Arg type, Defining the Arguments
- Arg::possible_values, Validating the Arguments
- Arg::takes_value function, Getting Started
- Arg::value_name function, Defining the Arguments
- Arg::with_name function, Defining the Arguments
- ArgMatches::values_of function, Creating the Program Output
- ArgMatches::values_of_lossy function, Creating the Program Output
- ArgMatches::value_of function, Defining the Arguments, Defining the Arguments
- Args struct, Accessing the Command-Line Arguments
- as keyword, Reading Bytes from a File
- ASCII, Reading Bytes Versus Characters, How wc Works
- range of ASCII table starting at first printable character, Solution
- ASCII art, Fortunate Son
- assert! macro, Writing and Running Integration Tests, Creating the Program Output
- Assert::failure function, Understanding Program Exit Values
- assert_cmd::Command, Adding a Project Dependency
- assert_eq! macro, Writing and Running Integration Tests, Creating the Program Output
- -a|--all option flag (ls), How ls Works, How ls Works
B
- backreferences, Defining the Arguments, Defining the Arguments
- backtrace, displaying, Reading Bytes from a File
- basename, Finding the Files
- bash shell
- basic regular expressions, Defining the Arguments
- beginning of file starting position in tailr, Defining the Arguments
- benchmarking, Benchmarking the Solution
- biggie program, Testing the Program with Large Input Files, Benchmarking the Solution
- binary files, Getting Started with “Hello, world!”
- bioinformatics, use of comm in, How comm Works
- BitXor operator, Solution
- Boolean::and, Solution
- Boolean::or, Solution
- Box type, Opening a File or STDIN, Converting Strings into Errors
- break keyword, Preserving Line Endings While Reading a File
- BSD version
- cal program, How cal Works
- cat utility, How cat Works
- comm utility, How comm Works, Processing the Files
- cut utility, How cut Works
- echo utility, How echo Works
- find utility, How find Works
- grep utility, How grep Works
- head program, How head Works
- ls utility, How ls Works
- tail utility, How tail Works, How tail Works
- uniq program, How uniq Works
- wc program, How wc Works
- BufRead trait, Opening a File or STDIN, Reading Bytes Versus Characters, Finding the Matching Lines of Input, Finding the Starting Line to Print
- BufRead::lines function, Preserving Line Endings While Reading a File, Counting the Elements of a File or STDIN, Extracting Characters or Bytes, Processing the Files
- BufRead::read_line function, Preserving Line Endings While Reading a File, Counting the Elements of a File or STDIN, Counting All the Lines and Bytes in a File
- BufRead::read_until function, Counting All the Lines and Bytes in a File
- BufReader, Printing the Lines
- bytes, How wc Works, How cut Works
- --bytes option, runing wcr with, Formatting the Output
- counting total bytes in a file in tailr, Counting the Total Lines and Bytes in a File-Finding the Starting Line to Print
- disallowing -c (bytes) flag in wcr, Getting Started
- extracting, Extracting Characters or Bytes
- finding starting byte to print in tailr, Finding the Starting Byte to Print
- number in input file, getting with wc, How wc Works
- printing in tailr, Printing the Bytes
- reading from a file, Reading Bytes from a File-Reading Bytes from a File
- requesting last four bytes of a file in tail, How tail Works
- requesting more bytes than a file contains in tail, How tail Works
- selecting from a string, Selecting Bytes from a String
- selection of, splitting multibyte characters in tail, How tail Works
- bytes argument, Getting Started, Parsing and Validating the Command-Line Arguments
- bytes option (tailr), Defining the Arguments
- bytes versus characters, reading, Reading Bytes Versus Characters
C
- -c, --bytes option (tailr), Defining the Arguments
- cal program, Rascalry-Summary
- calendar (see cal program)
- cargo new catr command, Getting Started
- cargo run command, Creating and Running a Project with Cargo
- cargo test command, Writing and Running Integration Tests
- cargo test dies command, Converting Strings into Errors
- Cargo tool
- case closure, Solution
- case-insensitive comparisons, closure handling in commr, Solution
- case-insensitive matching
- case-insensitive regular expression, Defining the Arguments
- case-sensitive pattern, Finding the Matching Lines of Input
- case-sensitive searching in fortune, How fortune Works
- casting, Reading Bytes from a File
- cat (concatenate) command, Creating and Running a Project with Cargo, On the Catwalk-Summary
- catr::run function, Creating a Library Crate
- cd (change directory) command, Organizing a Rust Project Directory
- chaining multiple operations in findr, Solution
- character classes, Using a Regular Expression to Match an Integer with an Optional Sign
- characters, How wc Works, How cut Works
- characters versus bytes, reading, Reading Bytes Versus Characters
- chmod command, Accessing the Command-Line Arguments, How cat Works
- chrono crate, Getting Started, Defining and Validating the Arguments, Getting Started
- chrono::Date struct, Defining and Validating the Arguments
- chrono::Datelike::day, Solution
- chrono::DateTime::format, Formatting the Long Listing
- chrono::Local, Defining and Validating the Arguments
- chrono::naive::NaiveDate, Defining and Validating the Arguments
- chrono::NaiveDate struct, Writing the Program
- chrono::offset::Local::today function, Defining and Validating the Arguments
- chrono::offset::Utc, Defining and Validating the Arguments
- clap utility, Getting Started
- clap::App struct, Parsing Command-Line Arguments Using clap
- clap::Arg type, Defining the Arguments
- Clippy code linter, Defining the Arguments
- clone-on-write smart pointer, Solution
- closures, Getting Started, Defining the Arguments
- creating to lowercase each line of text when config.insensitive is true, Solution
- filtering operations for findr, Solution
- versus functions, Solution
- handling case-insensitive comparisons for iterators in commr, Solution
- handling printing of output for grepr, Solution
- Iterator methods that take as argument, Getting Started
- removing filenames not matching regular expression for findr, Solution
- using to capture a value, Solution
- code point, ordering by, Solution
- colorize::AnsiColor, Summary
- Column enum, Solution
- comm (common) utility, Boston Commons-Summary
- comma (,) output delimiter, Defining the Arguments
- comma-separated values (CSV) files, How cut Works
- Command type
- command-line interface (CLI), creating test file for, Writing and Running Integration Tests
- command-line programs, Truth or Consequences-Summary
- Command::args method, Using the Result Type
- comments, Solution
- compiling Rust programs, Organizing a Rust Project Directory, Creating and Running a Project with Cargo
- composability
- concurrent code, Understanding Program Exit Values
- conditional compilation, Conditionally Testing on Unix Versus Windows
- Config struct, Defining the Parameters, Getting Started, Defining the Arguments
- constants, Using a Regular Expression to Match an Integer with an Optional Sign
- Coordinated Universal Time (UTC), Defining and Validating the Arguments
- count function, Writing and Testing a Function to Count File Elements
- counts
- count_lines_bytes function, Counting the Total Lines and Bytes in a File-Finding the Starting Line to Print
- Cow::into_owned, Selecting Bytes from a String, Solution
- cp command, Starting with Tests
- crate::Column::*, Solution
- crates, Creating and Running a Project with Cargo
- CSV (comma-separated values) files, How cut Works, Defining the Arguments
- csv crate, Getting Started
- csv::Reader, Final Boss
- csv::ReaderBuilder, Parsing Delimited Text Files, Final Boss
- csv::StringRecord, Parsing Delimited Text Files
- csv::WriterBuilder, Parsing Delimited Text Files, Final Boss
- Cursor type, Writing and Testing a Function to Count File Elements, Finding the Matching Lines of Input
- cursor, moving to position in a stream, Finding the Starting Byte to Print
- cut utility, Shave and a Haircut-Summary
- cyclomatic complexity, Creating the Test Output Files
D
- date command, Rascalry, Going Further
- Date struct, Defining and Validating the Arguments
- DateTime struct, Solution
- days, Solution
- dbg! (debug) macro, Defining the Parameters
- delimited text files, parsing, Parsing Delimited Text Files-Parsing Delimited Text Files
- delimiters
- changing tab output delimiter in commr, Solution
- comma output delimiter, setting with -d option, Defining the Arguments
- delimiter as u8 byte, Parsing Delimited Text Files
- escaping, How cut Works
- escaping in cutr utility, Final Boss
- tab character, comm output delimiter, How comm Works
- tab character, commr output delimiter, Defining the Arguments
- dependencies
- Deref::deref operator, Parsing the Position List
- dereferencing pointers, Using the Result Type
- dies (for failing tests), Writing Integration Tests
- diff utility, How echo Works
- difference, Boston Commons
- directories
- DirEntry, Solution
- DirEntry::file_type function, Solution
- DirEntry::path, Solution
- dirname, Finding the Files
- dir_long utility function, Notes from the Testing Underground, Notes from the Testing Underground
- Display trait, Accessing the Command-Line Arguments
- don’t repeat yourself (DRY) principle, Solution
- dotfiles, How ls Works
- dyn keyword, Using the Result Type
E
- -E flag for extended regular expressions, Defining the Arguments
- -e pattern regular expressions in grep, Defining the Arguments
- echo utility, Test for Echo-Summary
- editions of Rust, Creating and Running a Project with Cargo
- else keyword, Creating the Program Output
- end of file starting position in tailr, Defining the Arguments
- ending variable, Creating the Program Output
- entry types
- EntryType enum, Defining the Arguments
- EntryType::File, Solution
- enum type, Defining the Arguments
- $env:Path variable (Windows), Writing and Running Integration Tests
- environment, interacting with, Accessing the Command-Line Arguments
- EOF (end of file), Preserving Line Endings While Reading a File
- eprintln! macro, Creating a Library Crate
- Error trait, Using the Result Type, Getting Started, Converting Strings into Errors
- errors
- converting strings into, Converting Strings into Errors-Defining the Arguments
- error messages for cutr utility, parse_pos function, Defining the Arguments
- find utility searches, How find Works
- handling in finding matching input lines in grepr, Finding the Matching Lines of Input
- incorporating filename in input file error messages for commr, Validating and Opening the Input Files
- invalid file arguments printed to STDERR, Finding the Files to Search
- printing to STDERR for grepr finding matching lines of input, Solution
- printing to STDERR using eprintln!, Creating a Library Crate
- reporting for echor program, Parsing Command-Line Arguments Using clap
- unreadable directories in findr, Finding All the Things
- escape sequences created by Style::reverse, Writing the Program
- escaping special characters
- executables, Getting Started with “Hello, world!”
- exit values (program), Understanding Program Exit Values
- expected output versus actual output, Testing the Program Output
- expressions versus statements, Creating the Program Output
- extended regular expressions, Defining the Arguments
- Extract::Fields, Defining the Arguments
- extracting bytes, characters, or fields, Defining the Arguments, Parsing the Position List
F
- -f (force) option, Creating and Running a Project with Cargo
- false command, Understanding Program Exit Values
- false values, Writing and Running Integration Tests
- fd replacement for find, Going Further
- field init shorthand, Defining the Arguments
- fields, bytes, or characters, extracting, Defining the Arguments, Parsing the Position List
- fields, selecting from csv::StringRecord, Selecting Fields from a csv::StringRecord-Selecting Fields from a csv::StringRecord
- FILE argument (fortuner), Defining the Arguments
- file argument (tailr), Defining the Arguments
- file command, Getting Started with “Hello, world!”
- file glob patterns, differences in syntax from regular expressions, Defining the Arguments
- file globs, How find Works
- File::create function, Processing the Input Files, Solution
- filehandles, Opening a File or STDIN
- FileInfo struct, Writing and Testing a Function to Count File Elements
- files
- file types for find utility, How find Works
- filenames, transforming into regular expressions for findr, Validating the Arguments
- opening a file or STDIN with catr program, Opening a File or STDIN
- printing file separators, Printing the File Separators
- reading line by line, Reading a File Line by Line
- reading line in with catr program, Solution
- supplying as text source for fortune, How fortune Works
- unreadable, handling by fortune, How fortune Works, Finding the Input Sources
- files argument, Getting Started, Parsing and Validating the Command-Line Arguments
- filesystem module (standard), Comparing Program Output
- FileType::is_dir, Solution
- FileType::is_file, Solution
- FileType::is_symlink, Solution
- filter, map, and filter_map operations, chaining for findr, Solution
- find utility, Creating and Running a Project with Cargo, Finders Keepers-Summary
- finding files to search in grepr, Finding the Files to Search-Finding the Matching Lines of Input, Solution
- finding matching lines of input in grepr, Finding the Matching Lines of Input-Finding the Matching Lines of Input, Solution
- find_files function, Solution, Finding the Input Sources, Solution, Finding the Files, Solution
- find_lines function, Solution
- fixed-width text files, How cut Works
- flags, Accessing the Command-Line Arguments
- fn (function declaration), Getting Started with “Hello, world!”
- for loops, Preserving Line Endings While Reading a File
- format! macro, Using the Test Suite, Solution
- formatting output of wcr program, Formatting the Output-Formatting the Output
- format_mode function, Displaying Octal Permissions, Solution
- format_month function, Writing the Program, Writing the Program, Solution
- format_output function, Testing the Long Format, Solution
- fortune files, reading in fortuner, Reading the Fortune Files-Randomly Selecting a Fortune
- fortune program, Fortunate Son-Summary
- Fortune struct, Reading the Fortune Files
- fortunes, randomly selecting in fortuner, Randomly Selecting a Fortune-Randomly Selecting a Fortune
- From trait, Converting Strings into Errors
- From::from function, Converting Strings into Errors, Parsing the Position List
- from_reader method, Parsing Delimited Text Files
- fs::metadata function, Using the Test Suite, Solution, Solution
- fs::read_dir function, Solution
- fs::read_to_string function, Comparing Program Output
- functions
G
- -G flag for basic regular expressions in grep, Defining the Arguments
- get_args function, Getting Started, Getting Started
- calr program, Defining and Validating the Arguments
- calr program, parsing and validating arguments, Defining and Validating the Arguments
- commr utility, Defining the Arguments
- cutr utility, Defining the Arguments
- defining for wcr program, Getting Started
- findr utility, Defining the Arguments, Validating the Arguments
- fortuner program, Defining the Arguments
- in grepr, Defining the Arguments
- lsr utility, Defining the Arguments
- tailr utility, Parsing and Validating the Command-Line Arguments
- uniqr program, Defining the Arguments, Defining the Arguments
- using parse_positive_int in to validate lines and bytes options, Defining the Arguments
- get_group_by_gid function, Formatting the Long Listing
- get_start_index function, Finding the Starting Line to Print, Finding the Starting Byte to Print, Finding the Start Index
- get_user_by_uid function, Formatting the Long Listing
- glob pattern, handling by bash shell, Iterating Through the File Arguments
- GNU version
- cal program, How cal Works
- cat command, How cat Works
- comm utility, How comm Works, Processing the Files
- cut utility, How cut Works
- echo utility, How echo Works
- find utility, How find Works
- grep utility, How grep Works
- head program, How head Works
- tail utility, How tail Works
- uniq program, How uniq Works
- wc program, How wc Works, Going Further
- grep utility, Jack the Grepper-Summary
- groups, Formatting the Long Listing, Solution
- guards, Writing a Unit Test to Parse a String into a Number
I
- i32 type, Defining and Validating the Arguments
- i64 type, Using a Regular Expression to Match an Integer with an Optional Sign
- i64::wrapping_neg function, Using a Regular Expression to Match an Integer with an Optional Sign
- if expressions, Creating the Program Output
- immutability of Rust variables, Writing and Running Integration Tests
- impl keyword, Writing and Testing a Function to Count File Elements
- index files for random selection of text records, How fortune Works
- index positions, use by parse_pos function, Defining the Arguments
- inner joins, How comm Works
- input files
- input sources, finding in fortuner, Finding the Input Sources-Reading the Fortune Files
- --insensitive option, Finding the Matching Lines of Input
- insensitive flag, Defining the Arguments, Defining the Arguments
- integers
- integration tests
- intersection, Boston Commons
- Into trait, Converting Strings into Errors
- Into::into function, Defining the Arguments
- invert flag, Defining the Arguments
- inverting matching, Finding the Matching Lines of Input
- invert_match, Finding the Matching Lines of Input
- isize type, Getting Started
- iswspace function, Going Further
- Iterator type, methods that take a closure, Getting Started
- Iterator::all function, Getting Started, Solution
- Iterator::any function, Solution
- Iterator::collect function, Validating the Arguments, Solution, Parsing the Position List, Selecting Characters from a String
- Iterator::count method, Counting the Elements of a File or STDIN
- Iterator::enumerate function, Printing Line Numbers, Printing the File Separators, Printing the Bytes, Solution
- Iterator::filter, Solution
- Iterator::filter_map function, Solution, Solution, Selecting Characters from a String
- Iterator::flatten function, Selecting Characters from a String, Solution
- Iterator::flat_map function, Selecting Characters from a String, Selecting Bytes from a String
- Iterator::get function, Selecting Bytes from a String
- Iterator::last function, Testing the Long Format
- Iterator::map function, Parsing Delimited Text Files, Selecting Characters from a String
- Iterator::next function, Solution
- Iterator::take function, Reading a File Line by Line
- iterators
- itertools, Getting Started
- izip! macro, Solution
L
- last_day_in_month function, Writing the Program, Solution
- let keyword, Writing and Running Integration Tests
- lifetime specifiers for variables, Defining the Arguments, Testing the Program, Selecting Fields from a csv::StringRecord
- lines
- counting total lines in a file in tailr, Counting the Total Lines and Bytes in a File-Finding the Starting Line to Print
- finding starting line to print in tailr, Finding the Starting Line to Print
- getting number in a file, using wc, How wc Works
- preserving line endings while reading a file, Preserving Line Endings While Reading a File, Counting the Elements of a File or STDIN, Finding the Matching Lines of Input
- printing in tailr, Printing the Lines
- printing line numbers in catr program, Printing Line Numbers
- reading without preserving line endings, Processing the Files
- lines argument, Getting Started, Parsing and Validating the Command-Line Arguments
- lines option (tailr), Defining the Arguments
- links, Formatting the Long Listing
- Linux
- local time zone, Defining and Validating the Arguments
- long format (ls -l), How ls Works
- long format, testing in lsr, Testing the Long Format-Testing the Long Format
- long listing, formatting in lsr, Formatting the Long Listing-Formatting the Long Listing
- look-around assertions, Defining the Arguments
- ls utility, Creating and Running a Project with Cargo, Writing and Running Integration Tests, Elless Island-Summary
- -l|--long option flag (ls), How ls Works
- -l|--long option flag (lsr), Formatting the Long Listing-Formatting the Long Listing
M
- -m month option (calr), Defining and Validating the Arguments
- -m option (fortune), How fortune Works
- -m option (fortuner), Defining the Arguments, Reading the Fortune Files
- macOS, find output from BSD version, How find Works
- macros, Getting Started with “Hello, world!”
- main function, Getting Started with “Hello, world!”
- man cat command, How cat Works
- man echo command, How echo Works
- map, filter, and filter_map operations, chaining for findr, Solution
- mask method, Solution
- match function, including guard in, Writing a Unit Test to Parse a String into a Number
- match keyword, Opening a File or STDIN
- -max_depth and -min_depth options (find), Going Further
- memory
- metadata, Finding the Files
- metadata::gid function, Formatting the Long Listing
- metadata::is_dir function, Formatting the Long Listing
- metadata::len function, Formatting the Long Listing, Solution
- metadata::mode, Formatting the Long Listing, Displaying Octal Permissions
- metadata::modified, Formatting the Long Listing
- metadata::nlink, Formatting the Long Listing, Solution
- metadata::uid function, Formatting the Long Listing
- mkdir command, Organizing a Rust Project Directory
- mk_triple helper function, Solution
- mod keyword, Solution
- mod owner, Solution
- modified value, Solution
- modules imported to finish lsr, Solution
- month method, Defining and Validating the Arguments
- months
- more and less pagers, Going Further
- mut (mutable) keyword, Writing and Running Integration Tests
- mv (move) command, Organizing a Rust Project Directory
O
- octal permissions, displaying in lsr, Displaying Octal Permissions-Displaying Octal Permissions
- once_cell crate, Getting Started, Using a Regular Expression to Match an Integer with an Optional Sign
- open function, Iterating the Files, Extracting Characters or Bytes, Finding the Matching Lines of Input
- Option<Result>, Defining the Arguments
- Option type, Creating the Program Output, Getting Started
- Option::and_then, Defining and Validating the Arguments
- Option::map function, Defining the Arguments, Defining the Arguments, Defining the Arguments
- Option::transpose function, Defining the Arguments, Validating the Arguments, Defining the Arguments
- Option::unwrap function, Creating the Program Output, Defining the Parameters
- Option::unwrap_or_default, Validating the Arguments
- Option<&str>, Defining the Arguments
- optional arguments, Accessing the Command-Line Arguments
- or expressions, How find Works
- Ord::cmp function, Solution
- OsStr type, Solution, Solution
- OsString type, Solution
- output files
- Owner enum, Solution
P
- pagers, Going Further
- parse_index function, use in parse_pos, Parsing the Position List
- parse_int function, Defining and Validating the Arguments, Defining and Validating the Arguments
- parse_month function, Defining and Validating the Arguments, Defining and Validating the Arguments
- parse_num function, Parsing Positive and Negative Numeric Arguments
- parse_pos function, Defining the Arguments
- parse_positive_int function, Writing a Unit Test to Parse a String into a Number, Defining the Arguments
- parse_u64 function, Defining the Arguments, Defining the Arguments
- parse_year function, Defining and Validating the Arguments, Defining and Validating the Arguments
- parsing and vaildating arguments (tailr), Parsing and Validating the Command-Line Arguments-Processing the Files
- PartialEq trait, Writing and Testing a Function to Count File Elements
- PascalCase, Defining the Arguments
- $PATH environment variable, Writing and Running Integration Tests
- Path struct, Finding the Input Sources
- Path::display function, Finding the Files, Formatting the Long Listing
- Path::extension, Solution
- Path::file_name, converting from OsStr to String, Solution
- PathBuf type, Finding the Input Sources, Solution, Testing the Long Format, Solution
- PathBuf::metadata, Formatting the Long Listing
- paths
- pattern argument, Defining the Arguments
- pattern matching
- pattern option, Solution
- Perl Compatible Regular Expressions (PCRE), Defining the Arguments
- permissions, Solution
- pick_fortune function, Randomly Selecting a Fortune, Solution
- PlusZero variant, Defining the Arguments
- pointers, Using the Result Type
- positional arguments, Accessing the Command-Line Arguments
- PositionList type alias, Defining the Arguments, Parsing Delimited Text Files
- POSIX (Portable Operating System Interface) standards, Understanding Program Exit Values
- predicates, Getting Started
- predicates crate, Writing Integration Tests, Writing Integration Tests
- pretty-printing, Parsing Command-Line Arguments Using clap
- print closure, Solution, Solution
- print! macro, Creating the Program Output
- println! macro, Getting Started with “Hello, world!”
- print_bytes function, Printing the Bytes
- print_lines function, Printing the Lines
- program exit values, Understanding Program Exit Values
- pub, using to define public functions and variables, Creating a Library Crate
R
- -r (recursive) option, Creating and Running a Project with Cargo, Getting Started
- -R (recursive, maintain symlinks) option, Getting Started
- rand crate, Getting Started, Randomly Selecting a Fortune
- rand::rngs::StdRng::seed_from_u64, Randomly Selecting a Fortune
- rand::thread_rng function, Randomly Selecting a Fortune
- random number generator (RNG), Randomly Selecting a Fortune
- Range structs, Defining the Arguments
- Range type, Preserving Line Endings While Reading a File
- ranges
- raw strings, Parsing the Position List
- read head, Finding the Starting Byte to Print
- Read trait, Parsing Delimited Text Files
- read/write/execute mask values, Displaying Octal Permissions
- Reader::headers, Parsing Delimited Text Files
- Reader::records method, Parsing Delimited Text Files
- read_fortunes function, Reading the Fortune Files, Solution
- --recursive option, Finding the Files to Search, Finding the Matching Lines of Input
- recursive flag, Defining the Arguments
- recursive, case-insensitive search in grep, How grep Works
- redirect operator (>) in bash, How echo Works
- refactoring code, Solution
- references, Using the Result Type
- regex, Defining the Arguments
- (see also regular expressions)
- regex crate, Defining the Arguments, Defining the Arguments
- Regex::as_str method, Defining the Arguments
- Regex::captures, Parsing the Position List, Parsing the Position List, Using a Regular Expression to Match an Integer with an Optional Sign
- regex::Regex type, Defining the Arguments
- regex::RegexBuilder, Defining the Arguments
- RegexBuilder::build method, Defining the Arguments, Defining the Arguments
- RegexBuilder::case_insensitive method, Defining the Arguments, Defining the Arguments
- RegexBuilder::new method, Defining the Arguments, Defining the Arguments
- regular expressions, Finders Keepers
- about, Defining the Arguments
- case-insensitive, creating, Defining the Arguments
- creating lazily evaluated regular expression, Using a Regular Expression to Match an Integer with an Optional Sign
- creating to incorporate insensitive option in grepr, Defining the Arguments
- creating to match two integers separated by a dash, Parsing the Position List
- in grep, How grep Works
- -m option parsed as in fortuner, Defining the Arguments
- printing records matching a regular expression, Printing Records Matching a Pattern
- syntax differences from file glob patterns, Defining the Arguments
- syntax, options for, Defining the Arguments
- transforming filenames into for findr, Validating the Arguments
- using to match integer with optional sign, Using a Regular Expression to Match an Integer with an Optional Sign-Using a Regular Expression to Match an Integer with an Optional Sign
- Result object, Adding a Project Dependency
- Result<Option>, Defining the Arguments
- Result type, Comparing Program Output, Reading the Lines in a File
- Result::map_err function, Validating the Arguments, Defining the Arguments, Defining the Arguments
- Result::ok function, Solution, Finding the Files
- Result::unwrap function, Adding a Project Dependency, Comparing Program Output
- return keyword, Using the Result Type
- ripgrep (rg) tool, Going Further
- rm (remove) command, Organizing a Rust Project Directory
- Row type, Solution
- run function
- runs function, Writing and Running Integration Tests
- run_count helper function, Testing the Program
- run_long function, Notes from the Testing Underground
- run_stdin_count function, Testing the Program
- Rust programs, Truth or Consequences-Summary
- Rust projects
- rustc command, Organizing a Rust Project Directory
- RUST_BACKTRACE=1 environment variable, Reading Bytes from a File
S
- -s option (fortuner), Defining the Arguments
- sed utility, Solution
- --seed option (fortuner), Defining the Arguments
- Seek trait, Finding the Starting Byte to Print
- Seek::seek function, Printing the Bytes
- SeekFrom::Start, Printing the Bytes
- semantic version numbers, Creating and Running a Project with Cargo
- separators between input files in tail, How tail Works
- set operations, Boston Commons
- shadowing a variable, Printing Line Numbers
- shebang, Creating the Test Output Files
- show_hidden, Finding the Files
- signed integers, Getting Started
- slice::iter method, Getting Started
- SliceRandom::choose function, Randomly Selecting a Fortune
- slices, Using the Result Type, Getting Started
- Some<T> value (Option), Creating the Program Output
- sort command, How uniq Works, Going Further
- sources, positional arguments interpreted as in fortuner, Defining the Arguments
- spaces, delimiting bash shell CLI arguments, How echo Works
- src (source) directory, Organizing a Rust Project Directory
- stack memory, Using the Result Type
- standard (std) libraries, Writing and Running Integration Tests
- statements versus expressions, Creating the Program Output
- static annotation, denoting lifetime of values, Testing the Program
- static, global, computed value, Using a Regular Expression to Match an Integer with an Optional Sign
- std::borrow::Cow, Conditionally Testing on Unix Versus Windows
- std::cmp::Ordering, Solution
- std::cmp::Ordering::*, Solution
- std::convert::From trait, Converting Strings into Errors
- std::convert::Into trait, Converting Strings into Errors
- std::env::args, Accessing the Command-Line Arguments
- std::error::Error trait, Using the Result Type
- std::fmt::Display trait, Accessing the Command-Line Arguments
- std::fs, Comparing Program Output
- std::fs::File, Processing the Files
- std::fs::metadata, Finding the Files
- std::io, Reading Bytes Versus Characters
- std::io::BufRead, Finding the Starting Line to Print
- std::io::BufRead trait, Finding the Matching Lines of Input
- std::io::BufReader trait, Reading Bytes Versus Characters
- std::io::Cursor, Writing and Testing a Function to Count File Elements, Finding the Matching Lines of Input
- std::io::Read trait, Reading Bytes from a File
- std::io::Result, Reading the Lines in a File
- std::io::stdout, Solution
- std::io::Write, Solution
- std::iter::Copied, Selecting Bytes from a String
- std::mem, Solution
- std::mem::take, Solution
- std::num::NonZeroUsize, Parsing the Position List
- std::ops::Not, Getting Started
- std::ops::Range structs, Preserving Line Endings While Reading a File, Defining the Arguments
- std::os::unix::fs::MetadataExt, Formatting the Long Listing
- std::process::abort function, Understanding Program Exit Values
- std::process::exit function, Understanding Program Exit Values
- std::str::FromStr, Defining and Validating the Arguments
- std::time::SystemTime struct, Formatting the Long Listing
- STDERR, Testing the Program Output
- STDIN
- STDOUT
- str type, Using the Result Type, Formatting the Output
- str::as_bytes function, Reading Bytes from a File
- str::chars method, Counting the Elements of a File or STDIN, Selecting Characters from a String
- str::parse function, Writing a Unit Test to Parse a String into a Number, Parsing the Position List, Defining and Validating the Arguments
- str::repeat function, Solution
- str::split_whitespace function, Counting the Elements of a File or STDIN
- strfile program, How fortune Works
- strftime format options, Solution
- strftime syntax, Formatting the Long Listing
- String type, Creating the Program Output, Using the Test Suite, Formatting the Output
- String::chars function, Going Further
- String::clear function, Preserving Line Endings While Reading a File
- String::from function, Defining the Arguments
- String::from_utf8 function, Reading Bytes from a File
- String::from_utf8_lossy function, Reading Bytes Versus Characters, Reading Bytes from a File, Reading Bytes from a File, Finding the Starting Byte to Print
- String::new function, Preserving Line Endings While Reading a File
- StringRecord type, Parsing Delimited Text Files
- StringRecord::get function, Selecting Fields from a csv::StringRecord
- strings
- converting into error messages, Converting Strings into Errors-Defining the Arguments
- formatting for output of wcr, Formatting the Output
- parsing into a number, writing unit test for, Writing a Unit Test to Parse a String into a Number
- parsing into integer value, Defining and Validating the Arguments
- parsing string value into positive usize value, Writing a Unit Test to Parse a String into a Number
- printing empty string when reading from STDIN, Formatting the Output
- raw, in regular expressions, Parsing the Position List
- searching for text records matching given string in fortune, How fortune Works
- selecting bytes from, Selecting Bytes from a String
- selecting characters from, Selecting Characters from a String-Selecting Bytes from a String
- structs, Accessing the Command-Line Arguments
- Style::reverse, Solution
- symbolic links
- SystemTime struct, Formatting the Long Listing
T
- tab character output delimiter in comm, How comm Works
- tab character output delimiter in commr, Defining the Arguments
- tab-separated values (.tsv) files, How cut Works
- tabular crate, Getting Started
- tabular::Table, Solution
- tail utility, Tailor Swyfte-Summary
- how it works, How tail Works-How tail Works
- writing tailr version
- benchmarking the solution, Benchmarking the Solution
- counting total lines and bytes in a file, Counting the Total Lines and Bytes in a File-Finding the Starting Line to Print, Counting All the Lines and Bytes in a File
- defining the arguments, Defining the Arguments-Defining the Arguments
- finding start index, Finding the Start Index
- finding starting byte to print, Finding the Starting Byte to Print
- finding starting line to print, Finding the Starting Line to Print
- getting started, Getting Started
- going further, Going Further
- parsing and validating command-line arguments, Parsing and Validating the Command-Line Arguments-Processing the Files
- parsing positive and negative numeric arguments, Parsing Positive and Negative Numeric Arguments
- printing the bytes, Printing the Bytes
- printing the lines, Printing the Lines
- processing the files, Processing the Files
- regular expression matching integers with optional sign, Using a Regular Expression to Match an Integer with an Optional Sign-Using a Regular Expression to Match an Integer with an Optional Sign
- testing program with large input files, Testing the Program with Large Input Files
- take method (std::io::Read), Reading Bytes from a File
- TakeValue, Parsing Positive and Negative Numeric Arguments, Finding the Starting Line to Print
- target directory, Creating and Running a Project with Cargo
- tempfile crate, Summary
- tempfile::NamedTempFile, Testing the Program
- #[test] attribute, Writing and Running Integration Tests
- test-driven development (TDD), Starting with Tests, Writing and Testing a Function to Count File Elements
- test-first development, Starting with Tests
- testing
- tests directory, Writing and Running Integration Tests
- test_all function, Formatting the Output
- time command, Benchmarking the Solution
- touch command, How cat Works
- tr (translate characters) command, Writing and Running Integration Tests
- traits, Accessing the Command-Line Arguments
- tree command, Organizing a Rust Project Directory, Creating and Running a Project with Cargo, Going Further
- true and false values, Writing and Running Integration Tests
- true command, Understanding Program Exit Values
- tuples, Printing Line Numbers, Solution
- turbofish operator (::<>), Reading Bytes from a File, Defining and Validating the Arguments
- types
U
- u32 type, Defining and Validating the Arguments
- u64 type, Finding the Starting Line to Print
- Unicode, Reading Bytes Versus Characters, How wc Works
- unimplemented! macro, Writing a Unit Test to Parse a String into a Number
- uniq program, Den of Uniquity-Summary
- unit tests, Writing and Running Integration Tests
- creating for count function, Writing and Testing a Function to Count File Elements-Writing and Testing a Function to Count File Elements
- creating for cutr utility, Defining the Arguments
- test for extract_fields function, Parsing Delimited Text Files
- test_find_files in fortuner, Finding the Input Sources
- test_find_files in lsr, Finding the Files
- test_format_mode in lsr, Displaying Octal Permissions
- test_format_month in calr, Writing the Program
- test_format_output in lsr, Testing the Long Format, Testing the Long Format
- test_last_day_in_month in calr, Writing the Program
- test_parse_int in calr, Defining and Validating the Arguments
- test_parse_month in calr, Defining and Validating the Arguments
- test_parse_u64 in fortuner, Defining the Arguments
- test_parse_year in calr, Defining and Validating the Arguments
- test_read_fortunes in fortuner, Reading the Fortune Files, Randomly Selecting a Fortune
- writing to parse string into a number, Writing a Unit Test to Parse a String into a Number
- unit type, Getting Started, Using the Result Type
- Unix
- unknown character, How tail Works
- unreachable! macro, Validating the Arguments
- unsigned integers, Getting Started
- UpperCamelCase, Defining the Arguments
- usage statement, Creating and Running a Project with Cargo
- users, Getting Started, Solution
- users crate, Formatting the Long Listing
- usize type, Getting Started, Writing a Unit Test to Parse a String into a Number, Parsing the Position List
- UTC (Coordinated Universal Time), Defining and Validating the Arguments
- UTF-8 character encoding, Reading Bytes Versus Characters
V
- Values type, Creating the Program Output
- value_error closure, Parsing the Position List
- variables (Rust), Writing and Running Integration Tests
- Vec type, Creating the Program Output, Selecting Characters from a String
- Vec::chunks, Solution, Solution
- Vec::dedup function, Finding the Input Sources, Solution
- Vec::extend function, Solution
- Vec::first function, Parsing the Position List
- Vec::get function, Selecting Characters from a String
- Vec::join function, Creating the Program Output
- Vec::len method, Printing the File Separators
- Vec::push function, Selecting Characters from a String
- Vec::sort function, Finding the Input Sources, Solution
- Vec::windows, Going Further
- Vec<&str>, Selecting Fields from a csv::StringRecord
- Vec<EntryType>, Validating the Arguments
- Vec<Range<usize>>, Defining the Arguments
- Vec<String>, Solution
- vectors
- virtual environments (Python), Adding clap as a Dependency
W
- walkdir crate, Getting Started, Finding All the Things
- WalkDir type, Finding the Files to Search, Solution, Solution
- WalkDir::max_depth, Going Further
- WalkDir::min_depth, Going Further
- walkdir::WalkDir, Solution
- wc (word count) program, Word to Your Mother-Summary
- where clause, Finding the Starting Byte to Print
- Windows
- Windows Subsystem for Linux, How find Works, Elless Island
- word count (see wc program)
- words, getting number of, How wc Works
- Write trait, Solution, Summary