From 379c2c17e68d5d471a6a9673b7e9cd1fb9d99bbb Mon Sep 17 00:00:00 2001 From: 53hornet <53hornet@gmail.com> Date: Sat, 2 Feb 2019 22:59:54 -0500 Subject: Init. --- pgm2/makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 pgm2/makefile (limited to 'pgm2/makefile') diff --git a/pgm2/makefile b/pgm2/makefile new file mode 100755 index 0000000..3486352 --- /dev/null +++ b/pgm2/makefile @@ -0,0 +1,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 -- cgit v1.2.3