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
International

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

 






Current Newswire:

Apple to End Music Restrictions

Tools for Migrating from Windows to Linux

International Linux Developers: Falling for Cisco?

Things to Do With 'kill'

How to be a Geek Goddess

Tech Execs: Can We Stop the Stupidity?

Dual-Screen Laptop Madness From Lenovo

Linux Command Line For Beginners: Finding Help Documents

3G Mobile Broadband on Fedora Core 10

SECURITY: Security and Your Mother's Linux Box




Senior UNIX System Engineer (NE)
Next Step Systems
US-NE-Sidney

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]) (1686 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

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers