LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-07-2017, 06:25 AM   #1
beingswarupmall
LQ Newbie
 
Registered: Feb 2017
Location: India
Posts: 1

Rep: Reputation: Disabled
Shell script to generate report for each user ?


I have 3 user in my linux machine let's say a,b,c .By Using last command I am able to identify list of last logged in user and by w command who is logged in and what they are doing and by history command all command used by particular user all will be shown.


Now I want to write shell script which will show how much time ideal,how much they are logged in and how much command they have run for each user.

How to do this?
 
Old 02-07-2017, 06:54 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Welcome to LQ!
Show us your work, research, napkins.
 
Old 02-07-2017, 07:04 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Hi beingswarupmall and welcome to LQ.

The thread you started doesn't contain enough information to enable us to help you. We understand that Linux can be intimidating for new members, and we really do want to help. That said, please understand that LQ is not a help desk, customer service line for a product you purchased or willing to do your homework (although we are happy to assist you with specifics, if you show some effort of your own!). We're a 100% volunteer organization that wants to help you help yourself.

Additionally, this thread is being moved to the Programming forum to give better exposure for your question and the nature of it, however please realize that if you do not reply to improve the question, it will be difficult for others to offer you any assistance

Here are a couple tips that will enable us to help you moving forward:
  1. When asking a question, be sure to provide as many relevant details as possible. You should include the distribution and version you're using, along with hardware details, application version and exact error messages where applicable.
  2. Using a descriptive title will vastly increase the number of members who see your thread, and therefore make a response significantly more likely.
  3. If you're actively troubleshooting an issue you should also include any steps you've already taken.
  4. You may want to include how what you are experiencing differs from what you expected to experience.
  5. Before posting, have you used the search function to ensure your question hasn't been asked before?
  6. You can edit your post by clicking the EDIT button in the bottom right corner of your message.

If you are unwilling or unable to ask questions in a manner that allows us to help you, it's unlikely our community will be able to provide you a solution. Unfortunately, serial offenders who show wanton disregard for this request after multiple pointers may be asked to seek help elsewhere. We truly hope that isn't necessary, and assure you Linux and Open Source are extremely rewarding and well worth the learning curve in the long run.

Some additional reading that may help:
LQ Search
LQ Sitemap
LQ Site FAQ
How to ask technical questions to get quality answers
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to generate EXCEL sheet by shell script dani1234 Linux - Newbie 15 09-14-2014 07:36 PM
[SOLVED] Generate HTML report using shell script (BASH) rchincholkar Programming 3 07-21-2014 04:51 AM
How to generate shell script for 1 3 2 4 3 5 4 6..100 learngeek Linux - Newbie 5 12-06-2012 04:25 PM
How to generate report with user id's in SARG jomy Linux - Networking 2 01-04-2011 03:05 AM
Generate Items for a case shell script Snake_Eyes_ Linux - General 8 12-12-2009 06:56 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration