blob: 34863526df9e0a5aa3042e44c57d82db167d03e6 (
plain) (
blame)
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
|
all:
gcc -Wall -o rgpp rgpp.c -lm
clean:
rm rgpp
debug:
gcc -Wall -g -o rgpp rgpp.c -lm
test:
gcc -Wall -o rgpp rgpp.c -lm
# a) [6 pts] Straightforward line mode with a banner and line numbers:
grep -r -H -n -s -I -i the p2test | ./rgpp -l -b -n
# b) [7 pts] Straightforward word mode with a banner and line numbers:
grep -r -H -n -s -I -i the p2test | ./rgpp -w the -b -n
# c) [4 pts] Dealing with lots of files/hits:
grep -r -H -n -s -I -i the /usr/share/gutenprint | ./rgpp -l -b > output
# a) [1 pt] Invalid option (must produce error message):
grep -r -H -n -s -I -i the p2test | ./rgpp -l -b -k
# b) [1 pt] Invalid first option (must produce error message):
grep -r -H -n -s -I -i the p2test | ./rgpp -n -l -b
# c) [1 pt] Mismatch problems (no message and garbage out OK):
grep -r -H -n -s -I -i se p2test | ./rgpp -w the -b -n
rm rgpp
|