Write a script called ‘my_which’ that does the same thing as the Unix which command, but do it using a for loop over an if. Obviously, DO NOT call bash’s built-in `which` in your solution.
) Write a script called dircheck that takes one or more directory names as argument and displays the following information about each directory argument:
display a count of the number of subdirectories anywhere under this directory.
display a count of the number of files in the directory.
list all of the files in the directory that are zero length (you may use the ‘find’ command for this)
use ‘du’ to display the amount of storage space used by this directory
To test your script, you should create some subdirectories, some files that are zero length, using touch, and some files that are not zero length using vi, output redirection, or cp.
Example of use
$ dircheck  ~/hw ~/bin
(50 Write a bash script called `my_find` that does a subset of the find command. Obviously, DO NOT use `find` in your solution. You must handle (at least) the following options as described in the manual for find (and these will be tested for grading): -name (you should handle patterns for names), -type (f and d), -print, and -exec (you must handle {} for exec (hint: use sed), but you may assume the exec, if present, is always the last argument and, therefore, need not be terminated by a semicolon. Note also the predicates can come in any order and are implicitly short circuit ANDed together. You need not handle -o which is OR. Â Here is a sample command:
Â
$ my_find $HOME -name ‘*.o’ -type f -print -exec /bin/mv {} ~/.TRASH \;
I am very proficient in c, c++. I have 15 years c++ developing experience now, and I have worked for 5 years. My work is online game developing, and mainly focus on server side, the language is c++ under linux. I used c++ to make many great projects, for example, I made the tools which can convert java files to c++ scripts which has the same effect, of course garbage collection included. I also made our own mobile game using c++, I even can show you the demo of client. Trust me, please let expert help you.
I am a developer at Continental Automotive Romania, working with C/C++/Qt on Linux systems. I enjoy bash scripting and this is a project that I would enjoy working on.
Regards,
Stefan Comanescu
Sir/Ma'am
Being a Computer Science B-Tech Student i have been doing shell scripting in my course curriculum.
I would be happy if you provide me this project because it will help me to increase my knowledge as well as my experience before coming in the industry.
I am confident that, I can complete this work efficiently before time as required.
With the experience in the field, I am confident that, I can do it..