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

  Design, simulate and verify a 16-bit ripple-carry

Design, simulate and verify a 16-bit ripple-carry adder by performing the following additions/subtractions (the values of a and b are given in decimal): (i) (-10) + (100), (ii) (63) - (-127), (iii) (15) + (95), (iv) (-32) + (79), (v) (-59) + (-16)..

  Determining contents of the register a

The hexadecimal form of a 3-byte instruction for SIC/XE is 010030. The opcode in the instruction is LDA. Indicate the contents of the register A in decimal.

  Write a c++ program to calculate closet points from a list

Write a C++ program to calculate the closet points from a list. Output will be the name of 2 points Your input format will be : name x-value y-value The following is the input to test your program. A 10 50 B 30 70 C 20 40 D 40 10 E 30 20 F 20 50..

  Analyze the use of gestures in ipads

Analyze the use of gestures in iPads. Address how users feel about gestures and evaluate how users feel about the user input when it comes to filling out complicated forms on the iPad and assess the usability of back buttons and thumbnails on the iPa..

  Write a program that reads a file containing two columns

write a program that reads a file containing two columns of floating-point numbers. prompt the user for the file name. print the average of each column in c++.

  Write a program that computes the quotient and remainder

Write a program that computes the quotient and remainder using IJVM instructions and mic1 software. Please provide IJVM instructions!

  Facebook and privacy issues

Smartphones and Teenagers • Facebook and Privacy Issues • Challenges of Sport Organisations in Australia

  How pms allot preservation treatment to candidate project

1. Does PMS allot preservation treatment to candidate project? 2. If answer to question 1 is Yes or Under Development, which groups of treatments does PMS cover?

  What are the dod-specific requirements for an organization

What are the DOD-specific requirements for an organization's IT infrastructure and U.S. compliance laws that may affect the firm?

  The most frequent cause of it implementation failures

An evaluation of what you think is the most frequent cause of IT implementation failures. Justify your answer. Explain how change in management can help solve software implementation failures.

  Write the definition of a method

Write the definition of a method , isReverse , whose two parameters are arrays of integers of equal size. The method returns true if and only if one array is the reverse of the other. ("Reverse" here means same elements but in reverse order.)

  Create a stored procedure

The procedure must insert the next of kin information into the Next of kin table by looking up the student id from the Student table. (will you need a schema? how do I send it to you?) can you use just the tables for the student and next of kin?

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