-4

I'm supposed to write a bash script that has as an argument a path to a directory which contains a file named checking.txt. It needs to return the following exit codes:

  • 4, if the directory doesn't exist
  • 5, if that directory is not a subdirectory of /home/user5/task05/
  • 6, if checking.txt doesn't exist

How can I write these conditionals ?

closed as off-topic by slm, jasonwryan, Renan, rush, Anthon Nov 23 '13 at 21:16

  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    This question appears to be off-topic because it is about homework. – slm Nov 23 '13 at 13:40
2

It looks like a student task therefore I will not provide a solution, but some links that will help you to find it on your own.

And I wish you good luck in finding solution.

Not the answer you're looking for? Browse other questions tagged or ask your own question.