So after an uncomfortable number of hours of trying to do this, this is what I'm trying to do:
Write a bash shell script called direct.sh. This script will take an arbitrary number of command line arguments. Your script should create directories starting with the first argument, then the second directory inside the first one, and then the next one inside the second one, and so on.
For e.g. direct.sh dir1 dir2 dir3
should first create dir1, then create dir1/dir2, then finally create dir1/dir2/dir3
This is what I have done after 20 hours.
#!/bin/bash
for i in $@
do
mkdir -p $1/$i
done
I know its wrong. Please help.