Question: 3. (16 points) We want a Bash script which will take a lest of filcmanes on the connand line and print out how many lines
3. (16 points) We want a Bash script which will take a lest of filcmanes on the connand line and print out how many lines are in each file. For each of the following seripts, indiente whether it rorker. If it does not, show bow to fix it by changing the frucet characters posebble. (Note: output format is not important.) Script A Works as is. Nerds fixing: \#1 /bin/bash for filo in $0 do yc1file done Script B Works as is: Needs fixing \#!/bin/bash for file in \$* do echo n "isfile " grep c+1$sile done Script C Works as is. Needs fixing: \#1 bin/bash for file in? do echo - a "Sfile" tr -dc ' ln ' e sfile | wc c done Script D Works is is Needs tixing \#! / bin/bash for file in $6 do echo n "\$file " awk 'END { print NR \}' sfile done
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
