Script started on Mon Nov 16 17:31:39 2026 Restored session: Mon Nov 9 18:45:41 EST 2026 macbook:Desktop> cat q22.txt For Nov 16 What does the following shell code do? if [ -e "$1" ]; then echo "yes" else echo "no" fi a). prints "yes" when the child processes terminate b). prints "yes" when the child process exits with a non-zero error c). prints "yes" when the file given by $1 exists d). prints "yes" when the file given by $1 is at the end-of-file macbook:Desktop> vi testuntil.sh This is not the real vi macbook:Desktop> which vi /Users/mweeks/bin//vi macbook:Desktop> mv ~/bin/vi ~/bin/vi_not_real macbook:Desktop> vi testuntil.sh macbook:Desktop> chmod 700 testuntil.sh macbook:Desktop> ./testuntil.sh x = 1 ./testuntil.sh: line 2: [: too many arguments x = expr $x + 1 ./testuntil.sh: line 2: [: too many arguments x = expr $x + 1 ^C./testuntil.sh: line 2: [: too many arguments macbook:Desktop> vi testuntil.sh macbook:Desktop> ./testuntil.sh x = 1 ./testuntil.sh: line 5: [: too many arguments x = expr $x + 1 ./testuntil.sh: line 5: [: too many arguments x = expr $x + 1 ./testuntil.sh: line 5: [: too many arguments x = expr $x + 1 ^C./testuntil.sh: line 5: [: too many arguments x = expr $x + 1 macbook:Desktop> vi testuntil.sh macbook:Desktop> cd csc3320_Fall2026/programs macbook:programs> find . -name supps.c ./unix_ch12/make_project_v2/supps.c ./unix_ch12/make_project/supps.c macbook:programs> cd unix_ch12 macbook:unix_ch12> cd make_project macbook:make_project> ls db Makefile supps.c db.c parts.c supps.h db.h parts.h supps.o db.o parts.o example_makefile README.txt macbook:make_project> rm parts.o macbook:make_project> cat Makefile db: db.o supps.o parts.o echo "make db" ; gcc db.o supps.o parts.o -o db db.o: db.c db.h supps.h parts.h echo "make db.o" ; gcc -c db.c supps.o: supps.c supps.h echo "make supps.o" ; gcc -c supps.c parts.o: parts.c parts.h echo "make parts.o" ; gcc -c parts.c macbook:make_project> rm db macbook:make_project> ls db.c Makefile supps.c db.h parts.c supps.h db.o parts.h supps.o example_makefile README.txt macbook:make_project> make echo "make parts.o" ; gcc -c parts.c make parts.o echo "make db" ; gcc db.o supps.o parts.o -o db make db macbook:make_project> ./db The array has 10 values Value 5 is prime. macbook:make_project> touch supps.h macbook:make_project> ls -l supps.h -rw-r--r-- 1 mweeks staff 75 Nov 16 18:09 supps.h macbook:make_project> make echo "make db.o" ; gcc -c db.c make db.o echo "make supps.o" ; gcc -c supps.c make supps.o echo "make db" ; gcc db.o supps.o parts.o -o db make db macbook:make_project> cat db.c #include "db.h" int main() { int i; printf("The array has %d values\n", array_length()); array_init(a); i = array_length() - 2; array_set(i, 5); if (is_prime(a[i])) printf("Value %d is prime.\n", a[i]); else printf("Value %d is not prime.\n", a[i]); return 0; } macbook:make_project> cat db.h #include #include "parts.h" #include "supps.h" macbook:make_project> grep array_length *.[hc] db.c: printf("The array has %d values\n", array_length()); db.c: i = array_length() - 2; parts.c:int array_length() { parts.h:int array_length(); macbook:make_project> cd .. macbook:unix_ch12> cd .. macbook:programs> macbook:programs> macbook:programs> vi q23.txt macbook:programs> cat q23.txt The line void array_set(int, int); in the parts.h file is a a). function declaration b). function definition c). file declaration d). file definition macbook:programs> exit Saving session... ...saving history...truncating history files... ...completed. Deleting expired sessions... 3 completed. Script done on Mon Nov 16 18:43:14 2026