Question: Write a Perl script that works as below. a) It takes the name of a data file as parameter. This file Is the output of

 Write a Perl script that works as below. a) It takes

Write a Perl script that works as below. a) It takes the name of a data file as parameter. This file Is the output of the command ls -1 | tail -n +2 >lsfile Here is a sample content. -rw-r--r-- 1 cfs264sp170225 cfs264sp1702 21 2017-04-16 d1 drwxr-xr-x 2 cfs264sp170225 cfs264sp1702 4096 2017-04-16 dir1 -rw-r--r-- 1 cfs264sp 170225 cfs264sp1702 181 2017-04-16 lsfile -rwxr-xr-x 1 cfs264sp170225 cfs264sp1702 179 2017-04-16 p1 -rwxr-xr-x 1 cfs264sp170225 cfs264sp1702 14 2017-04-16 p2 -r-r-xr-x 1 cfs264spi 70225 cfs264sp1702 828 2017-04-16 signindata -rw-r--r-- 1 cfs264sp 170225 cfs264sp1702 210 2017-04-16 x b) The script examines each line of the file (given as parameter) and uses the information so read to determine the total space occupied by the entries listed in the file. The program prints nothing else. Here is a possible output. Total space = 5593 bytes The program must be exclusively in Perl and must be executable as shown below from the command prompt assuming

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!