Write a bash script that add two matrix textfile together using read line and for loop, butwithout using awk
m1 : m 2:
1 2 3 4 1 2 3 4 Show transcribed image text 1 2 3 4
1 2 3 4
Answer
// text codestarts here
#!/bin/bash
# getting the size of matrix
j=0
i=0
#get number of column
input=”/home/rahul/Desktop/m1.txt”
while IFS= read -r line
do
for num in $line
do
((j++))
done
break
done < “$input”
input=”/home/rahul/Desktop/m1.txt”
#get number of rows
while IFS= read -r line
do
((i++))
done < “$input”
#save the row size in variable m and column size in
OR
OR