I am making a bash script but I'm totally new and got lost.
I've made this code
cat * | grep "|*parameter1*|" | grep "|*parameter2*|" | cut -f 8,11,12,15,21,23,34 -d "|" | wc -l
which 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.
awk '( /\|parameter1\|/ || /\|paramater2\|/ ) { n++;} END{ print n}' input.file
– Rahul Patil Jul 10 '13 at 16:43