I try to customize a little BASH script for special proprose.
I'm confuse with BASH scripting when it come time to assigne a command to a variable.
My broken code:
if [ -n "$2" ]
then
top=`| head -n $2`
fi
awk '{print $17, ">", $19;}' $logs_folder$i | sort -g | uniq -c | sort -r -g $top
So by default it return all line but if the user specified a number, it will add the head command