Question: Can you write a ubuntu shell script program that shows the file size and the number of words in each file in a directory? The

Can you write a ubuntu shell script program that shows the file size and the number of words in each file in a directory? The name of the directory is eclipse-src and the name of the script file should be batch-process.sh.

Here is the sample output. Thanks!

Can you write a ubuntu shell script program that shows the file

ubuntu@ip-172-31-42-47:-/tmp/example-batch-system$ ./batch-process-Smith.sh ./eclipse-src/org.eclipse.jdt.apt.core/src/org eclipse/jdt/apt/core/util Processing ./eclipse-src/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/util/AptConfig.java file... File size: 40K Word count: 4407 Processing /eclipse-src/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/util/AptPreferenceConstants.java file... File size: 8. OK Word count: 479 Processing /eclipse-src/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/util/Aptutil.java file... File size: 4.OK word count: 199 Processing /eclipse-src/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/util//EclipseMessager.java file... File size: 8. OK Word count: 994 Processing /eclipse-src/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/util//IFactory Path.java file... File size: 4.OK word count: 595 Processing /eclipse-src/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/util//package.html file... File size: 4.OK Word count: 61

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!