Question
write a script that takes a filename on the command line as its argument. If no file name is provided, print an error message and
write a script that takes a filename on the command line as its argument. If no file name is provided, print an error message and exit. The script should compress the file with each of these programs: gzip, bzip2, and zip. At each stage, gather the size of the file before and after compression. Then, display a report showing the compression program, the uncompressed size, the compressed size and the compression ratio (up to one decimal place). This output should be ordered by the compression achieved, with the most efficient compression featured first. In UNIX/LINUX
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