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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started