Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a shell script that will count total size of files which size is an odd or an even number (depending on the parameter given

image text in transcribed

write a shell script that will count total size of files which size is an odd or an even number (depending on the parameter given in the command line at the time the script is executed). Your script will be executed in the command line as: scriptname dir name odd to calculate total size of all files of odd size. scriptname dir name even to calculate total size of all files of even size. Suppose you've got the following directory structure: -a.txt (size 5 bytes) L-b.txt (size 7 bytes) L-c.txt (size 1 byte) L-d.txt (size 4 bytes) For the example execution: scriptname./A odd your script should return 13 and for example, execution: scriptname./A even your script should return 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Building The Data Lakehouse

Authors: Bill Inmon ,Mary Levins ,Ranjeet Srivastava

1st Edition

1634629663, 978-1634629669

More Books

Students also viewed these Databases questions