I wrote a code to count the number of word per line. Here is my code
num= $(echo $compareFile1 | wc -w)
Here $compareFile1
contains each line. I am trying to get the number in num
variable. But I am getting the following error
line 3: 6: command not found
where 6
clearly the number of word. I checked. but there is nothing in the num
variable and also the error.
Anybody can help me?