Create unix command using c

Assignment Help C/C++ Programming
Reference no: EM131695229

Assignment: Create Unix Command using C

1. Introduction

The purpose of this assignment is to use command line arguments and files in C so that a new command may be designed. The command we will create is scopy i.e. selective copy that is a variation to copy only some number of lines if user wishes to enter a number

2. Instructions

You can usenanoor any other editor to write your C code.

The UNIX command would be replicating the Windows COPY command with the only exception that you may define the number of lines to copy.

Command name: scopy (selective copy)

Arguments :

Required : source file name, target file name

Optional : number of lines as an integer or range, -> n, -m, n- or n-m

3. Steps:

1. Make sure both source file and target file names are given and are valid
2. Make sure that the source file exists whereas target file DOES NOT EXIST.
3. No file should be overwritten without confirmation
4. If the number of lines is not mentioned, the entire file is copied.

Reference no: EM131695229

Questions Cloud

Shopping from face-to-face to online : Assuming that the shift in shopping from face-to-face to online is permanent, what will the closing of more department stores mean.
What would be effective in improving organizational ethics : Many organizations have responded by, for example, appointing a chief ethics officer, beginning an ethics training program for workers.
Discuss void-for-vagueness doctrine : discuss or expand on a topic presented in the textbook, a case dealing with the subject, or a current event from the news or Internet
Some lawyers claim that apple is a monopoly : Some lawyers claim that Apple is a monopoly. What would you need to know to answer this question, based on what you have learned in this course?
Create unix command using c : Create Unix Command using C. The purpose of this assignment is to use command line arguments and files in C so that a new command may be designed.
Review the arguments for and against social responsibility : Review the arguments for and against social responsibility. On a scale of 1 to 10, rate the validity and importance of each point.
Discuss kings distinction between just and unjust laws : Do you agree with King's belief that you need to create tension in order to have reform come about. Why or why not
What areas would stress in decision-making process : You are the CEO of an up-and-coming toy company and have plans to go international soon. What steps would you take to carry out that strategy?
Why is stock-based compensation added to net income : Apologies for the format, and hopefully I have included all necessary information: Why is stock-based compensation added to net income

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Implements a cyclic redundancy check algorithm

Write a C++ program that Implements a cyclic redundancy check algorithm in C++: The program should provide a mechanism for inputting a stream of data 128 bytes in length. It should calculate a 32-bit CRC for that data. It should output the data strea..

  When would you use a repetition statement

When would you use a repetition statement? Why? See chapter 5 for one example of the use of the for statement.

  Evaluate the mathematical constant of p

Write a C++ program to evaluate the mathematical constant of PI - Guess a random number between 0.00 and 1.00 and assign this to x.

  You are asked to write a simple driver program

In this assignment in c, you are asked to write a simple driver program and set of functions (maybe in a library) that can be performed on a binary search tree. Your program should allow user to insert/delete integer values into the binary search ..

  Combination of memory technologies

Give an example of how an operating system may use a combination of memory technologies with varying speeds, capacities and costs to achieve overall good performance at acceptable cost.

  Which of these sorting algorithms only works on integers

What is the third value in the postorder traversal of this binary search tree? What is the third value in the preorder traversal of this binary search tree?

  Create an object oriented solution customer to purchase

Create an object oriented solution that allows a customer to purchase between 1 and 3 pizzas, add toppings to each pizza, if desired, and then displays a receipt, including the details for each pizza, a pretax total amount, and a grand total amoun..

  Difference between aggregation and inheritance

A class called Employee has attributes for the name of the person and his/her salary, together with methods for accessing the attributes and methods for setting the attributes. A class SalesPerson is inherited from class Employee (described above)..

  Design a calculator program

Design a calculator program that will add, subtract, multiply, or divide two numbers input by a user. Your program design should contain the following: The main menu of your program is to continue to prompt the user for an arithmetic choice until th..

  Explain in a one to two 1-2 page narrative a use case

as an intern software developer for a retail bank you have been tasked with developing use cases to support the atm

  Create a small database with a table or two

Use Microsoft access to create a small database with a table or two. Remember that your Microsoft Access is most likely a more recent version, so you will see some differences.

  Implement the recursive version of the binary search

Write the code to test it out on a sample input. Compare its complexity with the iterative version found in the text book.

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