Exercises
Modify the
timed-readscript on page 112 so that it can take an optional default answer which will be returned if the timeout is exceeded.Modify the
rshscript on page 118 so that it returns the remote status of programs no matter how much output they produce.Modify the
rloginscript on page 120 so that it copies the X authority file. Modify the script so that it also supportstelnet.The
dumpprogram starts by printing an estimate such as:DUMP: estimated 1026958 blocks (501.44MB) on 0.28 tape(s).Write a script to print out how many tapes the next backup will take.dump’s knowledge of backup peripherals is often out of date. Assuming you are using a device much bigger thandumprealizes, write a script so thatdumpnever stops and asks for a new tape.Enhance the script you wrote for the previous question so that it does a better job of asking for tapes. For example, if your tapes are ten times as big as
dumpthinks, then the script should ask only once for every ten times thatdumpasks.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access