7.8. Homework 8 - Bash Shell Script ProgrammingΒΆ

  • homework_08.txt

  • Hint

    Number 4 may take a little more effort (not much more) than other problems we have done. You may want to use a function to help with this problem. See section 6.11 of the book. There are actually multiple ways to determine if a file is of zero length.

    1. see find -size
    2. see set --
    3. awk
    4. ! [ -s $file ]
  • Hint

    On Number 5, consisder the case where some files already exist in the directory that match the filenaming convention. Before renaming a file, make sure that a file with the new name does not already exist. To test for this, run your program once and then add some other files to the directory and run your program again.