Hi, thank you for your answer. No, it's not homework. It's just an excercise for myself that I would like to complete. I have already used the 'last' command which extracts info from the var/log/wtmp file. The only problem is that I don't know how to format the text correctly. I should probably save the text returned by the last command into a file or variable but I don't know how to begin. If you could give me any hints I would really appreciate it.
Thank you