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

  Convert the following two''s complement to decimal numbers

Convert the following two's complement representations to decimal numbers (assume 5 bit numbers). a. 11101 b. 01111 c. 10011

  Describe private and hybrid cloud computing models

In the current age of "hyper-connectivity", cloud computing is becoming more widely used and new platforms are emerging on a regular basis. You are required to conduct a review and comparison of public, private and hybrid cloud computing models.

  Social networking to make your organization more effective

How would you use social networking to make your organization more effective? If your organization currently uses a social networking tool, tell us which one and how you are using it. Even if your organization does not engage in social networking, is..

  Explain professional responsibility to complete installation

You are an engineer involved in the development of a financial system. During installations, you discover that this system will make a significant number of people redundant. It is your professional responsibility to complete the installation as..

  Statistics about the numbers read

Write a function whose job is to input #'s, non-# to quit, recover from the input failure by calling recover(), and tell main some statistics about the numbers read. . unsigned readA();

  What is the proper syntax of declaring a c-style string

Take a look at the following program -- #include using namespace std; int main( ) { char name[100]; //declare a character array cout > name; cout

  Complete set of logic gates

Do 2-input AND gates which have one input inverted form a complete set of logic gates? Rationalize your answer.

  Display the most frequently occurring word

the program should count how many times each word appears and display the most frequently occurring word, along with how many times it occurs.

  Create a visual basic program that creates a bill

Create a Visual Basic program that creates a bill for an automobile repair shop. The shop bills customers at the rate of $35 per hour for labor. Parts and supplies are subject to a 5% sales tax.

  Monitoring performance of it acquisition projects

Who is or should be responsible for monitoring the performance of IT acquisition projects and taking action that may result in cancelling the project?

  Describe the tasks and business functions

Describe the tasks and business functions that users, managers, and IT staff members perform to achieve specific results

  Develop a first-cut sequence diagram

Develop a first-cut sequence diagram, which only includes the actor and problem domain classes. Add the view layer classes and the data access classes to your diagram from part a. Develop a design class diagram based on the domain class diagram and..

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