Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have a question about a program I'm writing on the Bash shell. I have the following two files: My source code looks like this:
I have a question about a program I'm writing on the Bash shell.
I have the following two files:
My source code looks like this:
And my output looks like this:
The first two numbers, 2, 4 are correct because "m1" has 2 rows and 4 columns.
However, the third and fourth numbers are incorrect because "m2" has 4 rows and 2 columns.
Can anyone tell my why the output is incorrect?
Thanks!
osl/cs344/blockl 961$ cat ml 2 7 osl /cs344/blockl 9629 cat m2 osl /cs344/blockl 963$ if [ $# -eq 3 ] then argl-s2 arg2-$3 fi numRowsl- numRows2O #numColsi-$(head-n1 $arg1 I wc -w) #numCos2-$(head-n1 $arg2 | wc -w) while read currLinelStep 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