Linux Today: Linux News On Internet Time.
Search Linux Today
search.internet.com
Linux News Sections:  Blog -  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Preferences
Contribute
Link to Us
Search
Linux Jobs

Become a Marketplace Partner

internet.commerce
Be a Commerce Partner














The Linux Channel at internet.com
Linux Today
Enterprise Linux Today
Apache Today
JustLinux.com
Linux Planet
PHPBuilder
All Linux Devices
Technology Jobs

JustTechJobs.com

LinuxToday Newsletters
Subscribe News
Subscribe PR
Subscribe Security

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 







Current Newswire:

HP Enlists Partners to Help Steal Sun's Customers

SECURITY: Learn to use extended file attributes in Linux to boost security

Charlie's Games Release Irukandji for Linux!

Answering SCO Bit by Bit: a.out.h, errno.h and the GPL

Adobe PDF at Risk From Zero-Day Vulnerability

Code tutorial: make your application sync with Ubuntu One

Get the best KDE Linux distro

Statement on Busybox Lawsuits

Red Hat Settles Five-Year-Old Shareholder Lawsuit

10 OSes on the Move




System Administrator
WebMediaBrands Inc.
US-CT-South Norwalk

Justtechjobs.com Post A Job | Post A Resume
:Bash One-Liner Script To Produce Somewhat-Fancy Output Of Who's Logged In
Bash One-Liner Script To Produce Somewhat-Fancy Output Of Who's Logged In
Nov 19, 2008, 23 :33 UTC (0 Talkback[s]) (2825 reads)

(Other stories by Mike Tremell)

[ Thanks to Mike Golvach for this link. ]

"That is, as I've always understood, one of the main reasons to script things out in the first place. The other reasons, like automation, efficiency, etc, are pretty much ignored here, even though we will be automating a repetitive action and that, by definition, will make our waste of company time more efficient. No matter how you look at them, automation and efficiency always seem to be a good thing ;)

"This "script" is really just a simple pipe-slam so that we can figure out who's on the machine with us (my preference is for a script, but - as you'll soon see - this could just as easily be an alias, etc). Sure, we could just type "w" or "who," (and "w" does form the base of this bash one-liner script), but we'd like to have this whole thing look more personal. And by personal, I mean, we'd like to know who else is on other than us by UID or login name. The functionality (or relative merit) of this script depends heavily on the way in which users were created on your machine in the first place. If no "comment" (or "gecos") field is populated for users on your system, this command-chain is completely worthless."

Complete Story

Related Stories:
Fake Unix and Linux Advisory - The /dev/null Vulnerability(Nov 17, 2008)
Basic Veritas Cluster Server Troubleshooting(Nov 16, 2008)
XKCD - Linux, Unix And Other Funny Cartoons(Nov 16, 2008)
Getting CPU Information From Various Flavours Of Linux And Unix(Nov 14, 2008)
Broad Usage Of ipcs And ipcrm On Linux And Unix(Nov 13, 2008)
Updated Bash Script To Get Cable, Dish and Local TV Listings(Nov 11, 2008)
Unix And Linux Humor - Cult Satire(Nov 10, 2008)



No talkbacks posted.
  Home | Search Talkbacks | Customize View    Top of Page  



Enter your comments below:

* Your Name:

* Your Email Address:

* Subject:

CC: [will also send this talkback to an E-Mail address]

* Comments:

Tags allowed:<I>,<B> and <U>. See our talkback-policy for more about talkback content.

Fields marked with * are required!






..............................




All times are recorded in UTC.
Linux is a trademark of Linus Torvalds.
Powered by Linux, Apache and PHP


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers