I am making a bash script but I'm totally new and got lost.I've made this codecat * | grep |*parameter1*| | grep |*parameter2*| | cut -f 8,11,12,15,21,23,34 -d | | wc -lwhich works just fine, but I need to read the wc -l output into a variable so I can make an average after that with another bash command. Then, print out that average and make it readable to the user.
Read the output of a command into a variable
bash;shell;shell script;read