I'm trying to currently figure out the number of users using /bin/bash as their shell to login into the crux. I think I have the right command, but I'm not entirely sure. I was hoping someone could look at the two different commands I have and let me know if it's correct or possibly point me into a direction?
The first command I figured out (or I think so) is this one:
$ cat /etc/passwd | grep -c "/bin/bash"
Then I have another version of that command that I put together which was:
$ grep -c "bin/bash" /etc/passwd
As you can see they both come out with the same amount. But I guess what I'm trying to figure out is if that is getting what I'm trying to figure out, which is the number of users who use /bin/bash as their login shell in crux. I think both work correctly since both commands give me the same amount, but I guess I'm a little weary of it because I'm not sure if it's giving me the number of users who use /bin/bash as their login shell.