I have been trying to make 'ircusers' -file which contains few commandlines. Commandline -file shoud list all current users which are using irssi software from system's process list. And each user should be listed only ONCE. So print layout should be like this:
Login: mharriga Name: Mike Harrigan
Login: ahoobler Name: Andrew Hoobler
and so on.
I have tried few hours and I haven't got it work. Here is what I have now:
for names in " "; do ps -au | grep irssi | cut -d" " -f1 | sort -u; finger $names; done
echo 'Login: ';
cut -d" " -f1
echo 'Name: ';
cut -d" " -f2
I don't now how to combine those commands and get them work, if I am even close. Help?