This is going to be another scripting challenge.... you may use any language tools you want to solve it.
The task is to create two scripts (or one script with a symlink, whatevs) that will take as its only argument a 4 bit integer value (0-15) and create a file with a path based on the bit pattern. The directories should be created with the most significant bit first and will be named either "0" or "1" depending on the value of the bit in that position.
The first script should be called /usr/local/bin/seta and will use /var/math/a as its root directory. The second script will be /usr/local/bin/setb and use /var/math/b for its root. So, calling /usr/local/bin/seta 10 should create the directory /var/math/a/1/0/1/0/. Any files in the subdirectories will be ignored.
Your script should clear its target directory (/var/math/[a|b]) before writing files to ensure that data from previous runs will be removed. A third script called /usr/local/bin/adder has been provided and will add the two numbers you have encoded into directories. You will be graded on whether or not /usr/local/bin/adder returns the correct number.
Example:
[root@bean math]# pwd
/var/math
[root@bean math]# /usr/local/bin/seta 5
[root@bean math]# /usr/local/bin/setb 9
[root@bean math]# /usr/local/bin/adder
14
[root@bean math]# find -mindepth 5
./a/0/1/0/1
./b/1/0/0/1