Question: c programing language question 1. Introduction The purpose of this assignment is to use command line arguments and files in C so that a new

c programing language question

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 use nano or 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

Thanks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!