Results 1 to 3 of 3

Thread: [SOLVED]Script not working as how i want

  1. #1
    Join Date
    Nov 2017
    Beans
    13

    Talking [SOLVED]Script not working as how i want

    Ubuntu 16.04

    I want an script to show up all the users connected to the system and then show the user full name and then the last time he logged ON. i tried something like:

    #!/bin/bash
    who
    lastlogon.

    PD: Im new in ubuntu sorry guys, can you help me?
    PD2: lastlogon don't work if i write it alone but i look it up in network that it should work
    Last edited by jaweewo; November 21st, 2017 at 06:39 PM.

  2. #2
    Join Date
    Jun 2014
    Beans
    6,088

    Re: Script not working as how i want

    Put a semi-colon after the first command and it is not "lastlogon" but rather last logon".

    Code:
    who; last logon
    The link below gives various options for the 'who' command. Not sure what you want with the "user full name"?

    https://www.cyberciti.biz/faq/unix-l...gged-in-users/

  3. #3
    Join Date
    Nov 2017
    Beans
    13

    Re: Script not working as how i want

    Quote Originally Posted by yancek View Post
    Put a semi-colon after the first command and it is not "lastlogon" but rather last logon".

    Code:
    who; last logon
    The link below gives various options for the 'who' command. Not sure what you want with the "user full name"?

    https://www.cyberciti.biz/faq/unix-l...gged-in-users/
    Thanks bro! is just a test, i think i can take it with cut and /etc/passwd

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •