I am looking for help to create a loop that will create the directory structure.
I need something like this :
If "DIR2" does not exist > Create
IF "DIR2" exist already > check if onther "DIR" needs to be created
IF not > GO NEXT STEP of the script
otherwise
create "DIR3" and so on
.
or else you can loop around this command for all the input.
You dont need to check the directory and create the directory.
-p option create dir not exist else do nothing.
Then do your operations.
This is just a hint.
There's a useless use of cat in your code, and variablenames are case-sensitive. For the messages you can use the && and || operators (tested with bash-shell).