I've created a command to count the number of sessions each user on our server has. It is:
who | awk '{ print $1}' | sort | uniq -c | sort
which works fine, but when I move this into an alias on the server I'm only get the return of who,
alias who_con="who | awk '{ print $1}' | sort | uniq -c | sort";
I thought it might have been the double quotes so I tried single quotes for the encapsulation but I have the same behavior,
alias who_con='who | awk "{ print $1}" | sort | uniq -c | sort';
linuxwithversion 4.1.2(1)-releaseor what should the tag be?bashrcis a config file of Bash.who_conseems like the easiest way to get the result ofwho | awk '{ print $1}' | sort | uniq -c | sort.