I'm writing a program that prints the username and the number of times that the user has logged in, or prints "Unknown user" otherwise.
My code is the following:
iden=$1
c='last | grep -w -c $iden'
if (( $c > 1 ))
then
echo "$iden $c"
else
echo "Unknown user"
fi
And I keep getting this error:
-bash: ((: last | grep -w -c 123: expression recursion level exceeded (error token is "c 123")