From 86263ba2ea1169e526526ae4427db09ff435d0d3 Mon Sep 17 00:00:00 2001 From: tomit4 Date: Sat, 7 May 2022 16:20:11 -0700 Subject: [PATCH] copied table 5.2, which goes over some basics of regex in context of shell programming --- .../shell_pattern_matching_rules.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 unix_programming_environment/shell_pattern_matching_rules.txt diff --git a/unix_programming_environment/shell_pattern_matching_rules.txt b/unix_programming_environment/shell_pattern_matching_rules.txt new file mode 100644 index 00000000..867c4388 --- /dev/null +++ b/unix_programming_environment/shell_pattern_matching_rules.txt @@ -0,0 +1,13 @@ +------------------------- Table 5.2 ------------------------- + +* match any string, including the null string +? match any single character +[ccc] match any of the characters in ccc. + [a-d0-3] is equivalent to [abcd0123] +"..." match ... exactly; quotes protect special characters. Also '...' +\c match c literally +a|b in case expressions only, matches either a or b +/ in filenames, matched only by an explicit / in the epxression; + in case, matched like any other character +. as the first character of a filename, is matched only by an + explicit . in the expression