I'll get straight to the point.. I have one file called test.sh and in that file I have the below code. All this code is, is paths to three directories (as you can you can clearly see!).
BACKUP="Documents /bin /sbin"
Now I have this other file which reads the directories (by using $BACKUP) and creates a tar file of everything in that folder. But what I am unsure of what to is create a bit of code that will simply look in test.sh, read all the directories and print a line saying either they all exist or some are missing. If possible it would be good to know which directories are missing too!
I have fiddled around with using -d but I can only get it to work for one directory or manually having to write out each directory.
Any ideas experts?
Many thanks in advance.. you all do a great job!