Question
Instructions You can use nano or any other editor to write your C code. The UNIX command would be creating a variation of COPY command
Instructions
You can use nano or any other editor to write your C code.
The UNIX command would be creating a variation of COPY command where multiple files would be copied at the end of the final file in the list
Command name: merge (compile your program into the output file named merge)
Arguments :
Required : (at least three ) command, source file name, target file name
(additionally) number of extra files you may wish to give
Ex: ./merge a.txt b.txt c.txt d.txt -> appends the contents of a.txt b.txt and c.txt at the end of d.txt
Ex: ./merge a.txt b.txt c.txt d.txt e new.txt -> copies a.txt b.txt c.txt amd d.txt into a new file named new.txt (overwrites if this file already exist)
Requirements:
Make sure both all the filenames are valid
Make sure that the number of arguments are not less than 3.
Only the last file is changed keeping all other constant and if the last file name does not exist it will create it
In case of e switch, the last file will have the merged data of all other files
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