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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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