Question: USING UNIX SYSTEM CALLS IN C Reverse a file and write its data either to the screen or to another file (lastnameRV.c): Write a C

USING UNIX SYSTEM CALLS IN C

USING UNIX SYSTEM CALLS IN C Reverse a file and write its

Reverse a file and write its data either to the screen or to another file (lastnameRV.c): Write a C program (call it lastnameRV) that will reverse the content of a file and prints either to the screen or into a file ( -f flag). The command: Takes either one or two file names (source file sFile, and destination file dFile) as input Takes the following flag combinations: -f: if the dFile exists, its content is overwritten with the reversed content of sFile The commands below show the results given the following files: file1 contains: This is the content of file 1." $lastnameRv file1 .1 elif fo tnetnoc eht si siht. Will be displayed on the screen. $lastnameRV -f filel file2 file2 content will be: .1 elif fo tnetnoc eht si siht. Other input combinations should give the user hint messages of how to use the command. [-] reverse -f [-] reverse Reverse a file and write its data either to the screen or to another file (lastnameRV.c): Write a C program (call it lastnameRV) that will reverse the content of a file and prints either to the screen or into a file ( -f flag). The command: Takes either one or two file names (source file sFile, and destination file dFile) as input Takes the following flag combinations: -f: if the dFile exists, its content is overwritten with the reversed content of sFile The commands below show the results given the following files: file1 contains: This is the content of file 1." $lastnameRv file1 .1 elif fo tnetnoc eht si siht. Will be displayed on the screen. $lastnameRV -f filel file2 file2 content will be: .1 elif fo tnetnoc eht si siht. Other input combinations should give the user hint messages of how to use the command. [-] reverse -f [-] reverse

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!