korn shell scripting

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:
    There is a menu driven program and there are some fields to be achived

  2. Display contents of all .lst files in the current directory.

  3. For a student file with the following fields, rollno, name, marks. Generate 2 files �Pass� and �Fail�containing records of student who have passed or failed. Also count the number of students who have passed or failed.

  4. Accept a date string from terminal and display the employees born after the input date.

  5. Find the number of employees belonging to a particular department specified by user.

  6. Find the count of people in each dept. of the employee file.

  7. Generate a list of S.E. , who earn more than the amount specified by the user.

  8. View the employee records in order of designations.

  9. List employee details of all employees who earn more than the average salary of all employees.

  10. Relevant commands, code, scripts, algorithms:

#!/bin/ksh
 echo calender
cal
echo No of directories/Sub directories
find . -type f | wc -l
echo display day of the week for current date
date "+%A"
echo Display contents of all lst files in the current directory
echo Pass or Fail
if(marks < 35)
echo student fail >> fail.dat
else
echo student pass >> pass.dat
done
  1. The attempts at a solution (include all code and scripts):
#!/bin/ksh
 echo calender
cal
echo No of directories/Sub directories
find . -type f | wc -l
echo display day of the week for current date
date "+%A"
echo Display contents of all lst files in the current directory
echo Pass or Fail
if(marks < 35)
echo student fail >> fail.dat
else
echo student pass >> pass.dat
done

its done till 3rd question help me from 4th question

  1. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
    govt college(BU),bangalore(karnataka),India,naganna,bsc
    Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

There is a mistake on the 2nd question. I guess you find this code on internet but did you test it ?
It counts the number of files in the directories and subdirectories instead of the number of directories. You have to update it for your question:

man find
1 Like

i got itfrom net and even i tested it.

But that is not the way to do things, because by what I see, you havent solved even the first question...
So ( as I willing to help even if I seem hard with you..)
I want you tell me how you do :

  • You can display using what commands?
  • How do you find the files to list?