Put the result of counting search words in a variable

#!/bin/bash find *.txt | wc -l; 

this gives the number of txt files. In my program, as I put this output in a variable, say "count"

+7
source share
1 answer
 #!/bin/bash count=$(find *.txt | wc -l) 
+10
source

All Articles