Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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!
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
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