Write a shell script that copies the file named by its first

Assignment Help Computer Engineering
Reference no: EM132076030

1. Write a script that tests for at least 1 or more arguments in the line calling the script. If there are 0 arguments (use positional parameters), then notify user ofthe problem and exit status 1. Ifuser puts in an argument, echo program running" and exit with a status of0.

2. Write a shell script that copies the file named by its first argument (it must already exist) to a file with the same name with the filename extension of.bak.

Thus, ifyou call the script with the argument first (and a file named first exists in the working directory), after the script runs you would have two files: first and first.bak Next, add a test routine to verify the user has used an argument that is a valid file andnot a directory.

Ifit ot then quit the script with an 'exit 1

Reference no: EM132076030

Questions Cloud

Calculate the total cost of material : Orr Company makes and sells a single product called a Bik. Calculate the total cost of material A budgeted to be purchased in March
What do you think were the challenges faced by coco cola : What do you think were the challenges faced by Coco Cola when they attempted to enter the Indian market the first time? What did they do wrong?
Display the total as the number of points earned : If Even, the player won the game. Display appropriate message and display the total (Sum1+Sum2) as the Number of points earned.
Produces several lines of oak furniture : Oakmaster furniture inc. produces several lines of oak furniture,ranging from traditional to contemporary.
Write a shell script that copies the file named by its first : Write a script that tests for at least 1 or more arguments in the line calling the script. Write a shell script that copies the file named by its first argument
Create a java class named circle that implements java : Create a Java class named "Circle" that implements java.io.Serializable interface and models a circle based on radius.
Determine barry and connies lowest taxable income : Connie sold for $40,000 property she had inherited from her father in 2010. Determine Barry and Connies lowest taxable income
Write the code to create a function that would ask the user : Open a new file named grade.py. Create a class named ask. Have this class when called print the words "This is an easy A".
Prepare a schedule to allocate the purchase price : Prepare a schedule to allocate the purchase price to Carbury's assets and liabilities assuming Mendol paid $560,000 cash for the acquisition

Reviews

Write a Review

Computer Engineering Questions & Answers

  Define interface that implement the abstract data-type stack

Define the interface of a module that implements the abstract data-type STACK, where operation pop raises an exception if called to operate on an empty stack.

  Create the systems integration project proposal shell

Following is an outline for the comprehensive design proposal that will evolve throughout the course. This deliverable will be created in incremental steps.

  Is it right that rbac functionality is complicated

Is it right that RBAC functionality is complicated

  What do the methods setmaxage setvalue and get comment do

What are the primary benefits of using an IDE for building servlet applications? What do the methods setMaxAge, setValue, and get Comment do?

  Find the profit or loss made by him and express

Mike buys some electronic goods from a wholesaler for $650 and spends $100 on its transportation's, etc. If he sells these electronic goods for $900; find the profit or loss made by him and express it as percent.

  Calculate the total cost it will take the loaded truck

CS-224: Object Oriented Programming & Design Methodologies - Calculate the total cost it will take the loaded truck to travel 60 km, drop the cargo and return empty based on the fuel consumption when the tank was full. This means that the drivers n..

  How you will apply collaboration in course with your team

Consider the multiple definitions of collaboration. Define collaboration and how you will apply it in this course with your Learning Team. Be sure to reference and cite your sources.

  Write a recursive function with turtles to create triangle

Write a recursive function with turtles to create Sierpinski's triangle. Write a recursive function with turtles to create Koch's snowflake.

  How does a server tell that a capability is owner capability

How does a server tell that a capability is an owner capability, as opposed to a restricted capability? How are owner capabilities verified?

  Write a report on memory management with emphasis on memory

Write a 500+ Word technical report on "Memory management" with emphasis on virtual and cache memory. Include extensive diagrams and examples. Address the following points in your report: Introduction.

  What is the best definition of a trust boundary

What is the best definition of a trust boundary? What are the 3 most essential questions to ask in threat modeling?

  Make a database in ms access

create a database in MS Access and a set of reports to support a business . The following business rules should be addressed.

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