[HPADM] Re: [HPADM-SUMMARY] who|awk '{print $1}'

From: Stephanie Chung (stepchung_at_yahoo.com)
Date: 03/15/05

  • Next message: Marles, Rob: "[HPADM] RE: User NAME by login"
    Date: Tue, 15 Mar 2005 13:29:23 -0800 (PST)
    To: hpux <hpux-admin@dutchworks.nl>
    
    

    Thanks all. It's really simple that I can't think of.
    who|awk '{print $1}'|sort -u > file1.txt

    Thank much.

    Stephanie.

    --- Erik Platzbecker <E.Platzbecker@ewi.tudelft.nl>
    wrote:
    > From Stephanie Chung;
    > >
    > > I want to get username who login and redirect to a
    > > file. Here is the syntax which I use.
    > >
    > > who|awk '{print $1}' > file1.txt
    > >
    > > What I want is the file1.txt shows username one
    > time
    > > if that user login multiple session. Thanks for
    > your
    > > help.
    > >
    >
    > hm, never heard of 'sort' ?
    >
    > who | awk '{print $1}' | sort -u > file1.txt
    >
    > will do the trick ...
    >
    > regards,
    > --
    >
    ----------------------------------------------------------------------------
    > Erik Platzbecker |
    > Phone: +31 (0)15-2783896
    > A&I / Systems and Network Support |
    > T.FAX: +31 (0)15-2781086
    > Dept. of El.Eng., Math & Comp.Sci. (EWI) | room
    > : LB 02.180
    > Delft University of Technology |
    > e-mail:
    > PObox 5031, 2600 GA Delft, The Netherlands |
    > E.Platzbecker@ewi.tudelft.nl
    > -

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Marles, Rob: "[HPADM] RE: User NAME by login"

    Relevant Pages

    • Re: [kde-linux] Cant login via kde - hangs when "initializing peripherals"
      ... failsafe term then startkde - no problems ... I can login in under gnome - no problem. ... Do You Yahoo!? ... Mail has the best spam protection around ...
      (KDE)
    • putty login
      ... I am not connected to the internet. ... I can login using ... Do You Yahoo!? ... Mail has the best spam protection around ...
      (freebsd-questions)
    • Recent Updates and X
      ... I get the normal fedora login ... Do You Yahoo!? ... Mail has the best spam protection around ...
      (Fedora)
    • [kde-linux] Cant login via kde - hangs when "initializing peripherals"
      ... When logging in under kde - it spends a long time at "Initializing ... I can login in under gnome - no problem. ... Do You Yahoo!? ... Mail has the best spam protection around ...
      (KDE)
    • pop-up in kde startup
      ... login to my computer. ... Do You Yahoo!? ... Mail has the best spam protection around ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)