[SOLVED] CS4350-Homework2- write a script that find root,Print the count of files

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon A2-iypbtb.zip (157.2 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

CS  4350  –  Unix  Systems  Programming

Write the above as part of your documentation in the script as comments Write a script that will do the following :.

1. Find out whether you are a root or not. Assuming that he root’s uid is 501.
2. Print the count of files and subdirectories in the specified directory.

3. Count and print the total number of .txt files in the that directory, Note : Can not use the following command ls −l | wc −l

Must use a loop

4. Produce a file that contains the names of all sub folders with size 0 (that is empty sub folders) . Display the content of the file. 5. Assume that the input from the command is used to validate password strength. Here are a few assumptions for the password string.

• Length – minimum of 8 characters. • Contain both alphabet and number. • Include both the small and capital case letters.

If the password doesn’t comply with any of the above conditions, then the script should report it as a <Weak Password>.

6. Display the name of the directory that is entered from the command line in reverse order

Example : Assuming that abcd is name of a directory in your current home director , Use the following command to run your script

CS  4350  –  Unix  Systems  Programming

The following points will be deducted if :

• Compilation Errors, missing electronic copy , missing the hardcopy , using recursion ( – 10 points )
• Logical Errors ( at least .5 points )
• Other ( .75 points ) if any of the following takes a place : • Unable to read the source code due to unclear printing • Incorrect program file name. • Hard copy is not stapled. • More than one hard copy per group ( if it is done as a group ). • Incorrect Style such as but not limited to Missing Header comments , missing footer , missing / incorrect serial number , missing / incorrect section number , not replacing my name with your name… etc.

Sample  Run:  The  script  starts  her.  Replace  my  first  /  last  name   with  your    first  /  last  name
Opportunities    to  program    scripts  in  UNIX

  • A2-iypbtb.zip