O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Advanced Exercises

10. In the makercs (page 812) program, file descriptors 3 and 4 are opened; during the loop, output is directed to these descriptors. An alternative method would be simply to append the output each time it occurs, using, for example,
print "Cannot create $target" >> $ERRS 

rather than

print –u3 "Cannot create $target" 

What is the difference? Why does it matter?

11.The check in makercs (page 812) to prevent you from copying hierarchies on top of each other is simplistic. For example, if you are in your home directory, the call makercs . ~/work/RCS will not detect that the source and target directories lie on the same path. Fix this check.
12.In principle, recursion is never necessary. It can always be replaced by an iterative ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required