 | | For each day of the week, the program constructs a command to execute date, sending the output from that to grep, to search for the abbreviated day name. Each time, we save the termination status of grep (in a pipeline, the termination status of the entire pipeline is defined by the termination status of the last command in the pipeline) in the variable status. Next, we extract the exit status from the termination status, figure out what grep was telling us, and print an appropriate message. | |
|