1. To match any number of characters in a filename:
This lists all the files in the current directory that have the extension .txt. So Help.txt as well as nonsense.txt would be listed.
2. To match any single character in a filename:
cat memo? > mymemos
This concatenates all files with the filename
memo0 -> memo9 memoa -> memoz memoA -> memoZ
and places their contents in the file mymemos.
3. To remove a range of files:
This removes files part1, part2 and part3 from the current directory. If no files are found that match these names the message
4. To look for an expression in a file:
grep '[Jj]ohn' < addresses
This looks for and, if found, displays the lines containing the name john or John in the file addresses.
Notice that the expression to be searched for is enclosed in 'quotes' to prevent the '[' character being interpreted by the shell.