Create a script that asks the user for a file

Assignment Help Basic Computer Science
Reference no: EM13806981

Please create two scripts for UNIX/Linux

1. Create a script that asks the user for a file and then appends the date to the file the user has entered. Let the user know if the file can or cannot be written too. Also, if the file does not exist create the file and write the date in the newly created file. Lastly display to the user the file, including a statement letting them know that the file has changed. (Hint remember the -f and -w when evaluating a file in an if statement)

 2. Create a script that takes two numbers as input from the user, and then asks the user if they would like to add or subtract the two numbers (use a case statement). Then print out the result in a friendly message. Be sure to let the user know if they choose an option that was not on the menu. You will need to use expr (expression) command when evaluating, as in number='expr $num1 + $num2' along with the backquotes to store the results in the number variable (also note the s p a c e s).

Now modify your case statement so the user can use either an upper or lower case letter in the menu. That is if the user types a or A both will allow the case statement to run the add selection. (Hint use | as the or operator)

 

 

Reference no: EM13806981

Questions Cloud

Element of timing into your investment plan : You are not obliged to prefer ETFs over investment funds; make you choices and say why. Introduce an element of timing into your investment plan.
What are the essential qualities of a public servant : Write an essay that explaining What are the essential qualities of a public servant?
Assessment of the company investing : Consider the conditions in which it would make sense for the corporation to invest and manage its own fleet of trucks, as well as the benefits of not investing.
Why does subliminal persuasion continue to intrigue us : Why subliminal persuasion continue to intrigue and fascinate us? Using language of course text, explain whether or not subliminal messages in advertising exist, and whether or not you believe these tactics to be efficacious.
Create a script that asks the user for a file : Create a script that asks the user for a file and then appends the date to the file the user has entered. Let the user know if the file can or cannot be written too. Also, if the file does not exist create the file and write the date in the newly cre..
Information related to configuration management : Write a 700- to 1,050-word paper discussing managerial issues associated with managing an organization's IS infrastructure. Include the following: Information related to configuration management and preventative maintenance Industry standards in ..
Explain the process purpose and importance of stakeholder : Address the following: Explain the process, purpose and importance of stakeholder assessments. Conduct a stakeholder assessment of a project you have worked on in the past. If you do not have project experience, you may use a well known project from ..
Compare and contrast the two frameworks. : Give a brief description of cognition and its relationship to four dominant cognitive frameworks for HCI and Interaction Design. Provide full accounts of two of these frameworks: Mental Models and External Cognition,  with appropriate examples. Co..
Implement a personal scheduler windows application : Description: Implement a personal scheduler Windows application. The application should have the following features: Create a new Java Project named SchedulerApp. Add a new package named business.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Prove the set of all functions from a to b is countable

Let A = {0,1} and B be a countable set. Prove that the set of all functions from A to B is countable

  Web forms controls

Using Web Forms controls,create a Web application to include a TextBox object,a Button object,and a ListBox object. Allow the user to input values into the TextBox.Use those values to populate the ListBox object.

  Design a prototype for a standalone desktop

Design a prototype for a standalone desktop OR mobile/tablet application called EILA

  Explain the four stages of the bpm process and summarize

Explain the four stages of the BPM process and summarize the activities in each.

  Explain description design analyses

Description Design Analyses (perhaps include sub-categories for each process) Description of Units being Designed What do they remove? Explain how do they operate?

  Can the capability also be used to install windows 7

What Windows Server 2008 capability enables them to do the mass installation quickly and efficiently? What general steps are involved in setting up this capability? Can the capability also be used to install Windows 7 on the 24 new client workstat..

  Create an array to hold the hours and the hourly rate

Create an array to hold the hours and the hourly rate. Then print out the wages for each entry. The program should use a multi-dimensional array, a loop, and a jsr to calculate and print the values. this is in Jasmin language

  Software engineering code of ethics

1. "Software Engineering Code of Ethics and Professional Practice" Please respond to the following:•Describe one of the eight principles of the ACM Software Engineering Code of Ethics and Professional Practice and explain why the principle is impo..

  What is your all-time favorite linux-related website

What is your all-time favorite Linux-related website? Why is it your favorite (reference, utility, comic relief, etc.)?

  Why your program should require o(logn) time per order

The double action system operates as follows. When a new buy order of $x arrives it is simply stored for future use if none of the stored sell orders has an asking price lower than or equal to $x.

  A local department store hires you to write

A local department store hires you to write an automated checkout program to expedite customers in a hurry. The checkout line can only accept five items for any one purchase. Design a program that asks for the price of each item, and then displays..

  Write the code that reads an integer number called test

Write the code that reads values for a,b,c and displays their sum, repeating this process as long as none of the three values are negative.

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