First exam: Scheduled for Thursday, March 10 -- covers chapters 1-4.5.
First project due: Tuesday, March 8
Forget what you named that file? The grep command may help. grep is
used to search for files that contain the argument grepped for.
E.g.,
grep -i cd *
looks for the sequence "cd" in all of the files in the current
directory. The -i flag says to ignore the capitalization when doing
the search. (Note: the * is a "wildcard" in unix. It matches
anything.)
For example, in the directory that I did some class work in, I did the
following grep command and got the following results:
ren[2:05pm] [~/cisc181.97f/]> grep -i cd class*
class09.oct2:The cd command is used to change directories. E.g.,
class09.oct2:cd $CLASSHOME/examples
class09.oct2:cd ..
class09.oct2:cd
class09.oct2:cd ~username
class09.oct2~:The cd command is used to change directories. E.g.,
class09.oct2~:cd $CLASSHOME/examples
class09.oct2~:cd ..
class09.oct2~:cd
class09.oct2~:cd ~username
class13.oct16:alias cd.. 'cd ..'
The command restricted the search for cd to be among the files that
begin with "class". The system response tells me that three files
contain the sequence I am looking for: class09.oct2, class09.oct2~,
and class13.oct16.
D&D, Through 4.5
Exercises, p. 308-309 #4.8, 4.10