summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/files/L5.1a
blob: 6e206f480fb96fc421723b557777845892b455ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#print
Most UNIX commands, like "ls" and "cat", let you
specify any number of file names after the command.
To make this as easy as possible, there are some
ways to abbreviate file names.  This is usually
faster and more accurate than typing out the list in full.

For example, when the character "?" is used in a file name,
it will represent any character that might be
in a file name.  That is, the name "a?" is
an abbreviation for the files "a1", "a2", "aa",
and so forth.  You can say
  ls a?
and if there are any file names beginning with
"a" that are exactly two letters long, the computer
will tell you their names.  Try that here.
First list all the file names with "ls"; then type
  ls a?
to get all the two letter names beginning with "a".
Then type "ready".
#create a1
#create a12
#create abcdef
#create ax
#create aa
#copyin
#user
#uncopyin
grep '^ls a?$' .copy >/dev/null
#log
#next
5.1b 0
5.1c 5
5.1e 10