User Tools

Site Tools


journal:spring2019:bmather2:week3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
journal:spring2019:bmather2:week3 [2019/02/05 15:34]
bmather2
journal:spring2019:bmather2:week3 [2019/02/05 16:05] (current)
bmather2
Line 44: Line 44:
 Command expansion [` `] allows commands to be stored in variables Command expansion [` `] allows commands to be stored in variables
 or called directly in a line\\ or called directly in a line\\
-example: echo "there are `usr/​bin/​who | wc -l` users online"​+example: echo "there are `usr/​bin/​who | wc -l` users online"​\\
  
 +__**Wildcards**__\\
 +?       match 1 of any character\\
 +*       match 0 or more of any character\\
 +[ ]     match 1 of any enclosed characters (character class)\\
 +[^ ]    __do not__ match 1 of any of enclosed characters (inverted character class)\\
  
  
 +? examples:\\
 +ls ??? (Lists all files 3 characters long)\\
 +ls c??  (Lists all 3 letter files starting with c)\\
  
 +* examples:\\
 +ls c*  (Lists all files that start with c)\\
 +ls *c* (Lists all files with a c in them)\\
 +
 +[] examples:\\
 +ls [ct]*  (Lists all files starting with c or t)\\
 +ls [c-h]??? (Lists all files starting with c through h that are 4 characters long)\\
 +
 +[^ ] example:\\
 +ls [^aeiou]* (Lists all files that //​don'​t//​ start with a vowel\\
journal/spring2019/bmather2/week3.txt · Last modified: 2019/02/05 16:05 by bmather2