Write unix shell script to check file in current directory

Assignment Help Programming Languages
Reference no: EM1366868

Purpose: Write a Unix shell script (one program) called Project1_lastname (your lastname).
# This script will do the following tasks:
# Using "if" statement checks for a file called "student.txt" in the current directory.
# Removes (deletes) the file if it exist. This file will collect last name, first name, and grade for 5 students.
# Use a while loop to get the information (last name, first name, and grade) for 5 students.
# Grades should be 0-100. Use three different variable names (fname, lname, and grade) to read the data from the keyboard.
# Store the data read from the keyboard in a file called "student.txt".
# After reading all the data for 5 students, display contents of student.txt file on the monitor.

Prompt the user using tput command to read the information. tput will show the prompt (i.e "Enter first name: ") at the certain row and column. Use 3 tputs, one for each prompt.
Sort "student.txt" file by the last name and display it on the screen.

At least 3 tput commands. One tput for each prompt. Use tput command to display the prompts in certain rows and columns.

- Sort student.txt file by last name (Second field).

- Display the sorted information on the screen. First name, last name, and grade for the 5 students.

Reference no: EM1366868

Questions Cloud

Explain daytime processing load : Assume daytime processing load consists of 60% CPU activityand 40% disk activity. Your customers are complaining that the system is slow. Which would you select to yield best performance improvement for least amount of money?
Applied math on estimating price elasticity of demand : The marketing team for a restaurant wants to estimate the price elasticity of demand coefficient for its steak dinner. It priced its dinner at different price points in local restaurants to see how many would be sold at different prices.
Health care organization-efficient access-sharing data : Explain in detail what systems or methods your health care organization employs to give efficient access and sharing of essential information.
Demand-quantity demanded-supply : Explain what happens to price and quantity of milk when the following events take place: For each and every event, specify how it effects either demand, quantity demanded, supply, or quantity demanded. It is also important to demonstrate how the ch..
Write unix shell script to check file in current directory : Write Unix shell script (one program) called Project1_lastname (your lastname). This script will do the following tasks: Using "if" statement checks for a file called "student.txt" in current directory.
Determine best investment based on present value : Determine which of the following would be the best investment based on net present value? Suppose  an annual discount rate of 16 percent.
Health care laws or regulations : What are ways that health care laws or regulations influencing your health care organization or a healthcare organization with which you arewell known?
Determining market situation : Describe a market situation in which the operating company faces economic difficulties and need to cut costs. What cost cutting strategies may the operating company employ to remain profitable?
Supply and demand schedule for pizza : Graph the supply and demand schedule for pizza using $5 through $15 as the value of p. In equilibrium, how many pizzas would be sold at what price?

Reviews

Write a Review

Programming Languages Questions & Answers

  Program to enter up to 20 integers in the array of long

Write down a program which asks user in order to enter up to 20 integers in the array of longs.The program must utilize the function Find_It() in order to situate the integer within the array.

  Matrix multiplication code with mpi

Matrix multiplication code with MPI. At the beginning of each of the programs, write names of group members in the comment line.

  Create design of very simple racing game

Create a very simple racing game of your own design. Making a game from the ground up is a lot of effort, so let's keep things basic.

  Write a class for two instance variables

Write a class named ParkingMeter containing: Two instance variables named timeLeft and maxTime of type int. The value of timeLeft should be initialized to 0.

  Write code for member method expand

Write code for the member method expand. To keep the code simple, you may assume that the array element has enough capacity and does not need to be resized.

  Program to compute unit price of items sold

Manager of a Supermarket would like to be able to calculate the unit price of items sold there. To do this the program should input the name and the price of the item.

  Create class to calculate perimeter and area rectangle

Create class Rectangle. The class has attributes length and width, each of which defaults to 1. It has read-only properties that calculate the Perimeter and the Area of the rectangle.

  Write program that merges two files

The first programming project involves writing a program that merges two files that contain polynomials. To merge two files, the input files must be in sorted order.

  Discussion: html/css

Discussion: HTML/CSS,  "JavaScript Placement"  Please respond to the following: Compare and contrast the process of adding JavaScript and a Cascading Style Sheet to a Website. Determine if they can be used simultaneously in a page. If so, explain wh..

  Write program to accept five input values in array

Write a program that accepts five input values and stores them into an array. The program should display those five numbers in reverse order.

  Comparing running time of two algorithm

Which algorithm would you prefer on the basis of running time, suppose all other factors equal?

  Estimate the storage space for telephone book

Estimate the storage space (number of bytes) required for each of the following items: A telephone book with 10,000 entries consisting of names, addresses and phone numbers. Use your phone book to estimate the average length of an entry.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd