Script to display login session for past week

Hi, i am very new to Unix scripting and require some help / advice on a script that asks for a username and then outputs their login session for the past week. I know the 'last command' displays all login sessions from the past year but I'm not sure how to narrow this down to 7 days. I am using Oracle Solaris 11.2 SPARC if this helps.

You are wasting our time @grando

You cannot even provide basic correct info or show basic work effort on your part.

Do not post here unless you are going to show some basic ability or interest to ask a question providing details correctly and showing some effort.

This is a public forum.

1 Like